pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Prashant Dalal <pdalal@laborlogix.com>
To: pgsql-sql@postgresql.org
Subject: NOT-IN CLAUSE
Date: Mon, 15 Dec 2003 12:14:17 -0500
Message-ID: <NEBBKKKHLCPKJPDHMHMKCEEDLEAB.pdalal@laborlogix.com> (raw)

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

Attachments:

  winmail.dat (application/ms-tnef, 1.6K) download

view thread (2+ messages)  latest in thread

Message-ID: <NEBBKKKHLCPKJPDHMHMKCEEDLEAB.pdalal@laborlogix.com>
Permalink:  ../NEBBKKKHLCPKJPDHMHMKCEEDLEAB.pdalal@laborlogix.com/
Also on:    postgresql.org/message-id/NEBBKKKHLCPKJPDHMHMKCEEDLEAB.pdalal@laborlogix.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pdalal@laborlogix.com
  Subject: Re: NOT-IN CLAUSE
  In-Reply-To: <NEBBKKKHLCPKJPDHMHMKCEEDLEAB.pdalal@laborlogix.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox