Finding 'bad' characters

  • Hi All

    I am trying to find 'bad' characters that users might type in. My query is finding them as expected, but the results include records that I think my query should not return.

    Here is my query

    select NOTES  , ascii(left(NOTES ,1))

    from trip with(nolock)

    where (patindex('%[^ !-~]%' collate Latin1_General_BIN, NOTES ) > 0 or

    patindex('%[|]%' collate Latin1_General_BIN, NOTES ) > 0)

    Unexpected record

    CXBC    67

    Thank you

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply