Hi;
I'm tring to create a sql query in 6.5 that will find any unprintable
characters in a text field. I'm trying to use a where clause that looks
for specific ASCII codes but cant seem to get it work. Does anyone have
any ideas how to do this.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!David,
You can use below technique. In my example, I used CHAR(99) which is the letter 'c'. Replace this with the
ASCII code for the unprintable character you want to find.
SELECT *
FROM
(
SELECT 'abcdef' AS colname
UNION
SELECT 'abdef' AS colname
) AS d
WHERE CHARINDEX(CHAR(99), colname) > 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Cervelli" <cervelli@.adelphia.net> wrote in message news:OkpMIugiEHA.1348@.tk2msftngp13.phx.gbl...
> Hi;
> I'm tring to create a sql query in 6.5 that will find any unprintable
> characters in a text field. I'm trying to use a where clause that looks
> for specific ASCII codes but cant seem to get it work. Does anyone have
> any ideas how to do this.
> Thanks
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
No comments:
Post a Comment