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 |
plumby78
Starting Member
1 Post |
Posted - 2015-04-16 : 04:31:42
|
Hi all,I'm pretty much a novice at SQL programming so apologies if my question is basic!I have a query which runs exactly as I want it to. Let's say it returns this in a table:ID Number1 232 123 12I want to change (find and replace?) all the number 12s in the 'Number' column for a string. Let's say I want to change the 12s to the word: HelloWorld. Can this be done? I don't want to update the table, merely the table that is being returned in the query.I hope this makes sense. |
|
Maithil
Starting Member
29 Posts |
Posted - 2015-04-16 : 04:46:20
|
HiTry This SELECT REPLACE(CAST(Number as nvarchar),'12','HelloWorld') from Your_TableName |
|
|
|
|
|