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
精彩评论