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 |
|
sfjtraps
Yak Posting Veteran
65 Posts |
Posted - 2009-07-29 : 16:07:18
|
| Does anyone know the syntax to select varchar data from a field, search the varchar data for a specific string, and replace the string with something else?I'm trying to search for L2 in L2109got and change it to L3.Please help. Thanks, |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-29 : 16:19:34
|
UPDATE Table1SET Col1 = REPLACE(Col1, 'L3', 'L2')WHERE Col1 LIKE '%L2%' N 56°04'39.26"E 12°55'05.63" |
 |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-07-29 : 16:20:11
|
| Do you have Books On Line. Read about REPLACE statement. |
 |
|
|
sfjtraps
Yak Posting Veteran
65 Posts |
Posted - 2009-07-29 : 16:30:30
|
| Thank you so much, this worked great! |
 |
|
|
|
|
|