Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Johnph
Posting Yak Master
103 Posts |
Posted - 2012-09-19 : 16:29:38
|
Hello,I have a query that always bring back one result:Select [COLUMN] FROM [TABLE] The results look like this:Test.txtI want to write the query so that it can replace the .txt with .xlsx without changing the data in the table.For example:Test.xlsxDo I have to use REPLACE here? I am unfimilar with this. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-09-19 : 16:34:05
|
| Select REPLACE([COLUMN],'.txt','.xlsx') FROM [TABLE] |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2012-09-19 : 16:34:47
|
select replace([column], '.txt', '.xlsx') from [table]Be One with the OptimizerTGEDIT: |
 |
|
|
Johnph
Posting Yak Master
103 Posts |
Posted - 2012-09-19 : 17:14:58
|
| Hey guys, thanks so much! |
 |
|
|
|
|
|