Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Fixing Blank Characters

Author  Topic 

Johnph
Posting Yak Master

103 Posts

Posted - 2012-09-10 : 09:07:02
Hello,

I have a couple of fields showing up as blanks instead of NULLS. They are not spaces and when I try to run a few sql commands to figure out what they are they are consider "NULL"

I tried:

SELECT ASCII(NAME) FROM TABLE


It showed up as NULL

I also tried LTRIM and RTRIM the cell but no good.
Is there some type of command or query that will replace all the "blank" ASCII characters? or perhaps a query that can help me indentify all the ASCII characters within a cell?

For example for a field that has "ABC" is there such thing as convert it into ASCII and make it say "97 98 99" instead?



I ended up doing an UPDATE and set the specfied field to temporarily fix it.

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-09-10 : 09:13:30
[code]select cast(name as varbinary) from table[/code]
Go to Top of Page

Johnph
Posting Yak Master

103 Posts

Posted - 2012-09-10 : 15:56:11
Thank you so much!
Go to Top of Page
   

- Advertisement -