From: | "Prashant Dalal" <pdalal(at)laborlogix(dot)com> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | NOT-IN CLAUSE |
Date: | 2003-12-15 17:14:17 |
Message-ID: | NEBBKKKHLCPKJPDHMHMKCEEDLEAB.pdalal@laborlogix.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
My Following select st. is running from last one day. I think the problem is
NOT IN clause.
Please suggest the alternative select clause.
SELECT resreq.proj, resreq.ver, substr(resreq.act, -5, 5) act, resreq.rn,
null,
null, resreq.rl, resreq.dr, resreq.ra
FROM resreq
WHERE resreq.ver IN ('0', '99')
AND NOT (resreq.proj, resreq.ver, substr(resreq.act, -5, 5),
resreq.rn)
IN (SELECT actres.proj, actres.ver, substr(actres.act, -5, 5) act,
actres.rn
FROM actres, resreq
WHERE actres.proj = resreq.proj
AND actres.ver = resreq.ver
AND substr(actres.act, -5, 5) = substr(resreq.act, -5, 5)
AND actres.rn = resreq.rn
AND actres.ver IN ('0', '99'))
Best Regards,
Prashant Dalal.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LaborLogix
Attachment | Content-Type | Size |
---|---|---|
winmail.dat | application/ms-tnef | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-12-15 19:28:47 | Re: NOT-IN CLAUSE |
Previous Message | Tom Lane | 2003-12-15 16:22:07 | Re: dump and schema |