Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Is This the varchar2 ZLS Issue?

Is This the varchar2 ZLS Issue?

From: Tim Marshall <TIMMY!_at_PurplePandaChasers.Moertherium>
Date: Sun, 19 Mar 2006 19:01:12 -0330
Message-ID: <dvkm3n$9ll$1@coranto.ucs.mun.ca>


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?" - Ditto
Received on Sun Mar 19 2006 - 16:31:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US