Re: the difference between NULL and ' ':an interseting result

From: Tim Smith <tssmith_at_netcom.com>
Date: Thu, 6 Jan 1994 08:39:50 GMT
Message-ID: <tssmithCJ79EF.n1y_at_netcom.com>


In article <2gf4v5$r13_at_Joanna.Wes.Army.Mil> u4imcehb_at_apollo.wes.army.mil (Ernest Boswell) writes:
>ditommm_at_aa.wl.com wrote:
>: Try:
 

>: select ascii(substr(field,1,1)) char1,
>: ascii(substr(field,2,1)) char2
>: from table;
 

>: This should give you the collating sequence value of the character.
>: I think that if you are on an EBCDIC system this will not work.
 

>: Post the answer - I'm curious.
>Worked like a charm - i had run the ascii function against the first character,
>but it didn't occur to me to run it against the second character.
>
>BTW - the field contained {space}-{carriage-return}

A somewhat shorter method, that should work for any character set, is

select dump(field) from table where ...;

That'll give you the (decimal) numeric codes for the data in the column.

--Tim (tssmith_at_netcom.com) Received on Thu Jan 06 1994 - 09:39:50 CET

Original text of this message