where fld like '%[^' + char(97) + '-' + char(126)+ ']%'
like '%[x]%' seearches for an x in the string like '%[^x]%' seearches for any not x in the string like '%[^a-x]%' seearches for any charcter not between a and x in the string
from that it's just a matter of forming the strig to provide the check.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
works with '%[^' + CHAR(48) + '-' + CHAR(122)+ ']%' which is '%[^0-z]%'
You can then add the others individually '%[^0-z'+char(32)+char(33)+...+']%'
Might be worth investigating why it's happening. Could be that the code pages used mean that the ascii codes map to something that is not in order.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
COLLATION will play merry hell with this. Force the collation to Binary and it should be fine (although I do remember a weird report here a year or so back which was clearly a Collation issue but we never got to the bottom of why it was happening)