Re: select null ?
Posted in 1997
J'rgen Weber wrote:
>
> I tried with informix workgroup server:
>
> SELECT Spalte1, Spalte2, NULL, ..., NULL
> FROM Table1
> UNION ALL
> SELECT NULL, NULL, Spalte3, Spalte4, ..., NULL
> FROM Table2>
> This is not possible.
> Then I found that not even "SELECT null AS xx FROM tab" is possible,
> which works in sybase and access.
>
> Why is this that way?
By trying to select NULL, you are implying NULL is a value.
It is not.
You should create a temporary table with the desired columns
in it. Then, you should select from the Table1 and Table2
tables those columns you desire and insert them into the
applicable columns of the temp table leaving the nonapplicable
columns unset (ie. null).
-----------
Roger Tomas
AG Communication Systems