| Subject | Re: Is this legal SQL? | 
|---|---|
| Author | Svein Erling | 
| Post date | 2004-01-26T08:20:28Z | 
Why not simply
if (exists (select 1 from TABLEONE
join TABLETWO on TABLEONE.COL_IN_TABLEONE = TABLETWO.COL_IN_TABLETWO
where TABLEONE.HISTORIE > 0)
HTH,
Set
            if (exists (select 1 from TABLEONE
join TABLETWO on TABLEONE.COL_IN_TABLEONE = TABLETWO.COL_IN_TABLETWO
where TABLEONE.HISTORIE > 0)
HTH,
Set
--- In firebird-support@yahoogroups.com, "Henrik Sitter" wrote:
> Lets say I have:
> ***select 1 from table1 where col1 = 'aValue' and col2 = 'bValue'
> Both col1 and col2 belong to table1.
>
> But then I decide that col1 can be any value in an array, and this
array
> is built from a subquery. Then I get:
> select 1 from table1 where col1 in < subquery > and col2 = 'bValue'