开发者

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 '$ %'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜