sql modifying entries by adding a space
I just ran this command update table set mydata = '$' + mydata where [mydata] not like '$%'
which w开发者_StackOverfloworked well, but I forgot to include the space.
so now I have $123
and $ 123
how can I add the space to all entries?
For SQL SERVER you can
Update
table
Set
mydata = '$ ' + Right(mydata, Len(mydata)-1)
Where
mydata Not Like '$ %'
精彩评论