Subject | Re: [firebird-support] Union Issue |
---|---|
Author | Jonathan Neve |
Post date | 2003-10-22T06:17:19Z |
Helen Borrie wrote:
this context, what's to stop me doing :
select * from PensionPlans where PensionPland_Id in (select pensionPlan_ID from DB);
Without a UNION, this sort of thing works fine, I do it all the time.
Jonathan Neve.
[Non-text portions of this message have been removed]
>At 04:04 PM 21/10/2003 +0000, you wrote:One column, yes. But surely not one row. It depends on the context. In
>
>
>>This query works fine on by DB:
>>
>>select pensionPlan_ID from DB union
>>select pensionPlan_ID from DC
>>
>>but this one does not:
>>
>>select * from PensionPlans where PensionPland_Id in
>>(select pensionPlan_ID from DB union
>>select pensionPlan_ID from DC)
>>
>>It does not like the word 'union'
>>
>>
>
>Nope. Subqueries must return scalar output (one row, one column) and a
>union is by nature 2 or more rows ---> so verboten.
>
>
this context, what's to stop me doing :
select * from PensionPlans where PensionPland_Id in (select pensionPlan_ID from DB);
Without a UNION, this sort of thing works fine, I do it all the time.
Jonathan Neve.
[Non-text portions of this message have been removed]