Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Is This the varchar2 ZLS Issue?
Oracle server Version 8.1.7.4.0 .
According to some googling I've done, there is an issue with respect to zero length strings and varchar2. I suspect the following differences in a select count(*) are caused by it. Can someone simply confirm for me with a yes/no? THe column that contains nulls (not my design) in the where clause below is wo_acct_no.
Thanks very much in advance and if you have any suggestions on how to deal with it, I'd very much appreciated it, thank you.
SQL> edit
Wrote file afiedt.buf
1 select count(*)
2 from f_workorder
3 where
4 wo_request_date>=to_date('01-MAR-2006')
5* and nvl(wo_acct_no,'none') = 'none'
SQL> /
COUNT(*)
693
SQL> edit
Wrote file afiedt.buf
1 select count(*)
2 from f_workorder
3 where
4 wo_request_date>=to_date('01-MAR-2006')
5* and nvl(wo_acct_no,'') = ''
SQL> /
COUNT(*)
0
-- Tim http://www.ucs.mun.ca/~tmarshal/ ^o< /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake /^^ "What's UP, Dittoooooo?" - DittoReceived on Sun Mar 19 2006 - 16:31:12 CST
![]() |
![]() |