Don't think so. Use:

...
union
select '', '', dd2, dd3
/

The empty string is equivalent to null for inserts and updates.

hth,

Yosi


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 05, 2001 6:14 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: what to put in place of null
> 
> 
> Try applying data conversion function to_char/to_date or nvl 
> function if dd
> and dd1 are numbers to the nulls in the second select.
> Example:
> 
> cursor c1 is 
> select dd,dd1,dd2,dd3 from dd
> union
> select to_char(null),to_char(null),dd2,dd3 
> from dd1;
> 
> The point here is you need to have as many columns in your 
> second select
> statement as your first select has  and the datatypes have to match. 
> 
> -----Original Message-----
> Sent: Tuesday, June 05, 2001 5:31 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Hi,
> 
> I have a cursor declared as 
> cursor c1 is 
> select dd,dd1,dd2,dd3 from dd
> union
> select null,null,dd2,dd3 from dd1;
> 
> i am getting error:
> *
> ERROR at line 1:
> ORA-01790: expression must have same datatype as 
> corresponding expression
> ORA-06512: at "DY.REST", line 4
> ORA-06512: at "DY.REST", line 10
> ORA-06512: at line 1
> 
> what to replace null with......
> dd1 has only 2 columns dd2 and dd3.....
> 
> Thanks
> Harvinder
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Harvinder Singh
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: 
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to