views:

26

answers:

1

Hi, 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 gets 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!!!

+2  A: 
...LIKE '%[^A-Z0-9]%'

Looks for any character not alphanumeric in the string

gbn
That works!!! Thanks!!!
SARAVAN