Subject | Re: [firebird-support] Union Issue |
---|---|
Author | Helen Borrie |
Post date | 2003-10-21T16:15:20Z |
At 04:04 PM 21/10/2003 +0000, you wrote:
union is by nature 2 or more rows ---> so verboten.
where (not (exists (select db.pensionPlan_ID from DB db
where pp.PensionPland_Id = db.pensionPlan_ID)))
and (not (exists (select dc.pensionPlan_ID from DC dc
where pp.PensionPland_Id = dc.pensionPlan_ID)))
heLen
>This query works fine on by DB:Nope. Subqueries must return scalar output (one row, one column) and a
>
>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'
union is by nature 2 or more rows ---> so verboten.
>--is there a way to achive the sameselect * from PensionPlans pp
>results (i.e. all items in PensionPlans that do not have an ID in the
>DB or DC tables)?
where (not (exists (select db.pensionPlan_ID from DB db
where pp.PensionPland_Id = db.pensionPlan_ID)))
and (not (exists (select dc.pensionPlan_ID from DC dc
where pp.PensionPland_Id = dc.pensionPlan_ID)))
heLen