Subject | Re: [ib-support] SQL Problem |
---|---|
Author | Helen Borrie |
Post date | 2001-08-02T14:38:28Z |
At 03:35 PM 02-08-01 +0200, you wrote:
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hello all :-)The two sets that form the UNION have to match structurally. I think will just a NULL floating in the ether, the engine won't know whether the type matches or not. Let's assume IDX is a varchar, then this UNION might work:
>
>I try to do this simple Sql statement:
>
>SELECT DESCR,NULL FROM TAB1
>UNION ALL
>SELECT DESCR,IDX FROM TAB2
>
>with Access, DB2 and other this works fine, with IB it doesn't.
>I have tried with NULL,0,'',"" and other but nothing.
>
>Any suggestions?
>SELECT DESCR,'' as IDX FROM TAB1regards
>UNION ALL
>SELECT DESCR,IDX FROM TAB2
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________