开发者

How to remove a full stop from the end of data

I need to update my table because a number of fields in a column have got a fullstop on the end, i need to remove this.

So, in TableA, Field1: the data looks like

1002243.    
1007053.    
1007403.    
1104098.    
1110010.  

NOTE: Not all the fields are th开发者_运维百科e same length.

I need to remove the full stops.

Im using SQL Server 2005, cheers :)


UPDATE TableA
SET Field1 = LEFT(Field1 ,LEN(Field1)-1)
WHERE Field1 LIKE '%.'


Then you have data after the period. Try this to see:

Print '[' + Field1 + ']' and see if you get something like this:

[101. ]

There is a space after the period.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜