Re: Filling holes in union columns
Posted in 1999
Jay Walters wrote:
>
> I have two tables A with columns a, b and c; and B with columns a and
> b. Columns A.a and B.a are the same data type and A.b and B.b are also
> the same data type.
>
> I have a select similar to the following
>
> select a, b, c from A
> union
> select a, b, ?? from B>
> Using some other database products I'd just replace ?? with null and it
> would work. How do you do this with Informix? I've tried some other
> ways to get nulls into the ?? column but get data type conflicts etc.
I can suggest solution that I don't like
select a, b, c from A
union
select a, b, (select c from A where 1=0) from B
Sorry :-)
Of course you can create stored procedures returning null but
with different returning types.
Vardan
>
> Cheers
>
--
Vardan Aroustamian
vaar@geocities.com