Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012

    Unanswered: Query to identify fields with special characters

    Hi All,

    I tried to find relevant thread but did not find anything that answers my question. Appreciate if one of you can help me out either direct me to the thread or help me in finding right sql code.

    Basically, I'm trying to upload data from one system to another and the system which is receiving data is throwing error after loading few records. On further investigation I found out that the failing records has bad characters embedded. I was wondering if there is way to find out all the bad characters (special characters) in a table. I'm using MSSQL Server 2005 version. Tried using RegGenExpression but no luck.

    Thanks for your response in advance.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    SELECT *
       FROM staging_table
       WHERE questionable_column LIKE '%[^A-Z0-9]%'
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts