Re: Exists Tupel Queries ?
Posted in 2000
From: Paul Brown <paul.NOSPAM.brown@informix.com>
>
>Thorsten Geelhaar wrote:
>
> > Can anybody tell if it possible to ask for tupel in a
> > select statement ?
> > An example:
> >
> > Normaly : select id from tab1 where ( a=2 and b=3 ) or
> > ( a=3 and b=7 ) or
> > ( a=5 and b=10)
> >
> > Wanted somthing like this:
> >
> > select id from tab1 where (a,b) in ({2,3},{3,7},{5,10})>
> In IDS.2000:
>
> SELECT T.Id
> FROM Foo T,
> TABLE(MULTISET{ROW(2,3),ROW(3,7),ROW(5,10)
> }::MULTISET(ROW( Num1
>INTEGER NOT NULL,>
>Num2 INTEGER NOT NULL
>
>) NOT NULL)
> ) S
> WHERE T.A = S.Num1 AND T.B = S.Num2;
>
> You can drop things like SET, MULTISET, and LIST into the FROM
>clause.
Ah, bugger! I suppose this means I have to read *another* manual. :->
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com