May 18, 2009 at 1:36 pm
The column's data type is NVarChar(50). The cells appear blank. The field holds the names of different individuals.
I've tried different things to select those records that are blanks.
Select * From Person Where FirstName IS NULL
Select * From Person Where FirstName = ' '
Both of these queries returned NOTHING.
What did WORK was:
Select * From Person Where FirstName <= 'a' Is that just the nature of NVarChar? If so, that seems a bit unintuitive that neither of the other two queries wouldn't work. Thanks!
May 18, 2009 at 1:43 pm
Try this:
Select DATALENGTH(FirstName), CONVERT(VARBINARY(MAX), FirstName) From Person
If DATALENGTH returns zero there is nothing within your column, otherwise the second column shows the binary data.
Greets
Flo
May 18, 2009 at 1:44 pm
Try:
Select unicode(FirstName) From Person Where FirstName <= 'a'
Then check the value returned against the unicode character set at www.unicode.org.
Does that help?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 18, 2009 at 1:45 pm
Your field contains nonprintable characters....
what does return select ascii(right(field_name,1)) ????
May 18, 2009 at 2:26 pm
Weird guys!
Ok i tried each one of your functions returned NULL! I tried all 3. But the IS NULL did not work.
I'm satisfied. At least i was able to do what i wanted to and i learned some things.
Thanks!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply