Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with IN predicate

1 view
Skip to first unread message

amir

unread,
Jul 13, 2008, 9:13:54 AM7/13/08
to
I have a query in Oracle like this:
Select 1 from dual
where
(1,1) IN ( (1,1), (2,1) )

and want to convert it to DB2.
I tried this query:
Select 1 from sysibm.sysdummy1
where
(1,1) IN ( (1,1), (2,1) )
I replaced "," with SPACE and ";" but got error.

It will be appreciated to help me to solve this problem.
Best,

Lennart

unread,
Jul 13, 2008, 10:18:41 AM7/13/08
to

I assume that your real query is different and that this is just an
example? Anyhow, try:

select 1 from sysibm.sysdummy1 where (1,1) IN ( values (1,1), (2,1) )

/Lennart

amir

unread,
Jul 15, 2008, 1:28:03 AM7/15/08
to
> I assume that your real query is different and that this is just an
> example? Anyhow, try:
Exactly!

> select 1 from sysibm.sysdummy1 where (1,1) IN ( values (1,1), (2,1) )
I tried this but got error like before:
<<SQL0104N An unexpected token "," was found following "+ ) -".
Expected tokens may include: "". SQLSTATE=42601>>

Lennart

unread,
Jul 15, 2008, 5:22:48 AM7/15/08
to

Which platform and version?


/Lennart

amir

unread,
Jul 19, 2008, 7:16:27 AM7/19/08
to
I am connecting directly to DB2 7 Client Command Center
0 new messages