Subject | Re: FW: [firebird-support] Is this legal SQL? |
---|---|
Author | Helen Borrie |
Post date | 2004-01-26T10:17:22Z |
At 10:23 AM 26/01/2004 +0100, you wrote:
it is. This is, after all, only an existential test!!
if (exists (select 1 from TABLETWO T2
JOIN TABLEONE T1
ON T1.ARTNR = T2.ARTNR
where T2.COLOR = 'aValue'
and T1.HISTORY > 0) ) then
/hb
>Hi, Helen and Svein Erling!Well, Henrik, I think you are trying to make this far more difficult than
>
>Table 1:
>Name -> TABLEONE
>Columns -> ARTNR, HISTORY
>
>Table 2:
>Name -> TABLETWO
>Columns -> ARTNR, COLOR
>
>if (exists (select 1 from TABLEONE
> where ARTNR in (select ARTNR from TABLETWO
> where COLOR = 'aValue')
> and HISTORY > 0
> )
> ) then
>begin
>.
>.
>.
>end
it is. This is, after all, only an existential test!!
if (exists (select 1 from TABLETWO T2
JOIN TABLEONE T1
ON T1.ARTNR = T2.ARTNR
where T2.COLOR = 'aValue'
and T1.HISTORY > 0) ) then
/hb