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 -> Re: How can place NULL value in View definition?

Re: How can place NULL value in View definition?

From: Lothar Armbüster <lothar.armbruester_at_rheingau.netsurf.de>
Date: 16 Dec 99 19:54:22 +0100
Message-ID: <917.19T1130T11943541@rheingau.netsurf.de>


laulau823 wrote at 16-Dez-99 18:05:43
on the subject How can place NULL value in View definition?:

>I want to UNION two table with the following SQL statement:

>create or replace view testing as
>select a.*, b.do DO from test1 a, test2 b where ...
>UNION
>select a.*, NULL DO from test1 a, test2 b where ...

>b.DO is integer type, however, I got the error message as the datatype
>mismatch in NULL column (NULL column is UNION with b.do column, I
>think integer type cannot match with NULL).

>Is it possible to place the NULL value (i.e. don't place anything) in
>the corresponding column in view definition?

Hello David,

I think you can do something like to_number(null). This way you get a "typed null" and the union should work.

Hope that helps,
Lothar

--

Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Hauptstr. 26            | lothar.armbruester_at_t-online.de
D-65346 Eltville        |

Received on Thu Dec 16 1999 - 12:54:22 CST

Original text of this message

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