开发者

how many records have a column value longer than 400 characters?

I have field in the table which I have set to max size. I need to know how many records have crossed over 400 char in length.

I need to transfer this data into another table where the size 开发者_如何学Cis set to 400. I need to know how many records could get truncated.

How I can achieve this?


SELECT * FROM mytable WHERE LEN(MyField) > 400

Note differences in LEN and DATALENGTH about trailing spaces etc

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜