开发者

SQL server retrieve table rows based on a single column that contains special/garbage characters

开发者 https://www.devze.com 2023-01-11 13:54 出处:网络
I have a InsuranceDetails SQL table, one of the column is VIN whose type is varchar(20). Ideally this column should contain only Alphanumeric values (Upper case and lower case allowed) as you might kn

I have a InsuranceDetails SQL table, one of the column is VIN whose type is varchar(20). Ideally this column should contain only Alphanumeric values (Upper case and lower case allowed) as you might know about a typical VIN number.

For some reason this field g开发者_C百科ets some garbage values during insert.

I need to write a query that will get the rows in InsuranceDetails table which contains garbage/special characters in VIN Column.

Any help would be appreciated!!!


...LIKE '%[^A-Z0-9]%'

Looks for any character not alphanumeric in the string

0

精彩评论

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

关注公众号