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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: what to put in place of null

RE: what to put in place of null

From: Kevin Lange <kgel_at_ppoone.com>
Date: Tue, 05 Jun 2001 14:40:03 -0700
Message-ID: <F001.0031D0CB.20010605144823@fatcity.com>

I don't usually put a null like that in a union. I usually use a '' for a character and a 0 for a number and turn all dates to character. This way there is no matching problem. The thing is, you might have to use a value that you can then work with.

For example, if you data is all positive numbers, you might want to use a -1 to match up to numbers. This way you can test the selected data and act on it accordingly. Plus, if your data is character and can not contain an '*' you might want to use it opposite of character fields. Its all data dependent.

-----Original Message-----
Sent: Tuesday, June 05, 2001 4: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: Harvinder.Singh_at_MetraTech.com

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: ListGuru_at_fatcity.com (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: Kevin Lange
  INET: kgel_at_ppoone.com
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: ListGuru_at_fatcity.com (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). Received on Tue Jun 05 2001 - 16:40:03 CDT

Original text of this message

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