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 -> Problem with NULL columns in UNION's

Problem with NULL columns in UNION's

From: Paul Dyer (E-mail) <pcdyer_at_yahoo.com>
Date: Wed, 18 Aug 1999 14:56:09 +0100
Message-ID: <1ED9BB6BF02AD211AE2400104B59E64E173968@RDEX1>

we are doing selects from two different tables using a UNION. If there is no corresponding
column on the second table we have been using NULL in SQL Server. Unfortunately ORACLE rejects
this on numeric & date columns giving error (ORA-01790 expression must have same
datatype as corresponding expression).

The only solution to this I have found so far is to use TO_NUMBER(NULL) and
TO_DATE(NULL,'DDMMYY'). is this the best resolution ? Received on Wed Aug 18 1999 - 08:56:09 CDT

Original text of this message

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