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 |
|
Mondeo
Constraint Violating Yak Guru
287 Posts |
Posted - 2007-09-03 : 15:22:02
|
| I have a field category, I need to go through every row and if category doesn't start with : then add the : to the front.If I was doing this in VB it would look something like thisIf category.startswith(":") then' Do nothingElsecategory = ":" + categoryEnd IfCan I do this with an sql statement?Thanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-09-03 : 15:26:01
|
UPDATE Table1SET Col1 = ':' + Col1WHERE Col1 NOT LIKE ':%' E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|