Home » RDBMS Server » Server Administration » "NOT IN" operator with more than one condidition
"NOT IN" operator with more than one condidition [message #370897] Fri, 03 March 2000 08:50 Go to next message
Halvor Nyberg
Messages: 2
Registered: March 2000
Junior Member
I did it like this:
"Select max(REVISION), ITEM_KEY From ITEM
where (ITEM_TYPE)=0 and ITEM_KEY||REVISION
NOT IN (SELECT PARENT_ITEM||PARENT_REVISION from ITEM_PS_DEF)
group by ITEM.ITEM_KEY"

But how do I do it by using AND instead of || (concat)

Regards Halvor
http://members.tripod.com/Nybbies/vb.htm
http://members.tripod.com/easydoc/dim.htm
Re: "NOT IN" operator with more than one condidition [message #370911 is a reply to message #370897] Mon, 06 March 2000 05:33 Go to previous message
Thierry Van der Auwera
Messages: 44
Registered: January 2000
Member
Hallo Halvor,

You do it like this :

Select max(REVISION)
, ITEM_KEY
From ITEM
where (ITEM_TYPE) = 0
and (ITEM_KEY,REVISION) NOT IN (SELECT PARENT_ITEM,PARENT_REVISION
from ITEM_PS_DEF)
group by ITEM_KEY

Greetings,

Thierry
Previous Topic: Re: Any good library of SQL*Plus scripts anywhere?
Next Topic: Which is faster Join or subquery
Goto Forum:
  


Current Time: Wed Oct 21 11:56:53 CDT 2020