开发者

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

开发者 https://www.devze.com 2023-02-27 00:22 出处:网络
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 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

精彩评论

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