Nonprinting characters

Last Post 21 Dec 2007 06:08 AM by trans53. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
trans53
New Member
New Member

--
20 Dec 2007 08:40 PM
Hi guys,

I have many nonprinting characters in the database almost in each record and the only way i can see that is when i query the table from EM.is there any way to see these characters using T-SQL? i would like to identify which records and columns have those and then replace those with something else.

Thanks
SQLUSA
New Member
New Member

--
21 Dec 2007 12:37 AM
How do you see non-printing characters from EM?
trans53
New Member
New Member

--
21 Dec 2007 06:08 AM
Right click on the table and query the table.
trans53
New Member
New Member

--
21 Dec 2007 07:00 AM
Thanks a lot
nosepicker
New Member
New Member

--
21 Dec 2007 08:36 AM
This looks kinda stupid, but I think it can work with a little bit of tweaking:

SELECT * FROM YourTable
WHERE YourColumn LIKE '%[^0-9][^a-z]%'
AND YourColumn NOT LIKE '%[!@#$%^&*()-_=+`~{}\|;:''",<.>/?]%'
AND YourColumn NOT LIKE '%[[]][]]%'

Basically, the first LIKE comparison looks for any character that's not a numeric or a letter. The second LIKE looks for anything that's not one of the common keyboard symbols. The third LIKE takes care of the square brackets (which I couldn't figure out how to incorporate into the second LIKE). Some tweaking might be needed depending on what you consider to be a nonprintable character. I would just consider this to be an alternate method - it certainly isn't as clean as Russell's method.



nosepicker
New Member
New Member

--
23 Dec 2007 11:11 AM
An early Xmas gift from Pete, thanks!
You are not authorized to post a reply.

Acceptable Use Policy