Hi.
I have this table (A)
IDJOB ¦ IDKIT
4 ¦ 19
4 ¦ 19
2 ¦ 19
2 ¦ 5
I need to extract IDKIT with IDJOB2 if and only if IDKIT IDKIT when
IDJOB=2
In this case my query should return null
With a subquery I can do this and it works
SELECT idkit from A where
with IDJOB=2, group by IDKIT, with max(IDJOB2=2)
You'll get:
IDKIT | max(IDJOB=2)
19 | 1
Take lines with max(IDJOB=2)=0
Hope that helps,
Oren.
-Original Message-
From: Matteo Ferrari [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 12:56 PM
To: [EMAIL PROTECTED]
Subject: instead
Hi,
Hi.
I have this table (A)
IDJOB ¦ IDKIT
4 ¦ 19
4 ¦ 19
2 ¦ 19
2 ¦ 5
I need to extract IDKIT with IDJOB2 if and only if IDKIT IDKIT when
IDJOB=2
In this case my query should return null
With a subquery I can do this and it works
SELECT idkit