Quote:
Originally posted by RKrick
Andy and Anto,
this construct (where (app_id,seq_id) not in ...) doesn't work at OS390 V6.1 either. For both cases, you'll have to wait until DB2 UDB V8 for zOS.
Using version 6 for OS390, you need a subselect.
SELECT ...
FROM mytable M1
WHERE seq_id = 1
AND NOT EXISTS
(SELECT 1
FROM mytable M2
WHERE M2.app_id = M1.app_id
AND M2.seq_id > 1)
HTH,
|
Without knowing anything about OS390 I assume that the following would also work in the scenario described:
SELECT app_id
FROM mytable M1
group by app_id
having count(seq_id) = 1
just a thought
/Lennart