SeaninSeattle
IS-IT--Management
I have three tables I'm trying to use in a query (to pull up a list of RECNUM and PO Numbers, but not those in a resricted table SEANR), two of which I need to do a left outer joint on. My script:
select PO20301.RECNUM, PO20302.PONUMWRK
from PO20301 LEFT OUTER JOIN PO20302
on PO20301.RECNUM = PO20302.RECNUM
and PO20301.RECNUM = SEAN2.RECNUM
and PO20302.PONUMWRK not in
(select PONUMWRK from SEANR)
is not complete because I need to add the table "SEANR" to it to provide a list of those PO numbers not to include in the selection. I thought I could just add it by adding ",SEANR" to the end of the second line - but I was wrong.
Does anyone know what the correct syntax should look like?
Thanks for your help!
//sse Sean Engle
Admin/DirIS
ssengle@bswusa.com
select PO20301.RECNUM, PO20302.PONUMWRK
from PO20301 LEFT OUTER JOIN PO20302
on PO20301.RECNUM = PO20302.RECNUM
and PO20301.RECNUM = SEAN2.RECNUM
and PO20302.PONUMWRK not in
(select PONUMWRK from SEANR)
is not complete because I need to add the table "SEANR" to it to provide a list of those PO numbers not to include in the selection. I thought I could just add it by adding ",SEANR" to the end of the second line - but I was wrong.
Does anyone know what the correct syntax should look like?
Thanks for your help!
//sse Sean Engle
Admin/DirIS
ssengle@bswusa.com