Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help!!!!! Select!!!!! 1

Status
Not open for further replies.

NiteCrawlr

Programmer
Mar 16, 2001
140
BR
I have 2 tables (NGRM10 and ROMA10) I need help to make a Select statement which Select everything from table NGRM10 which cannot exist in ROMA10.
The select I'm trying is:

Select * from NGRM10 WHERE PCC_GRM = '"&pcc&"' AND NRO_GRM NOT IN (SELECT GRM_ROM FROM ROMA10)

but it doesn't work.

Thank you,

Frederico
 
What result are you getting? The query looks right as long as NRO_GRM and GRM_ROM are related columns.

You might also try this query.

Select NGRM10.*
From NGRM10 Left Join GRM_ROM
On NGRM10.NRO_GRM = ROMA10.GRM_ROM
WHERE NGRM10.PCC_GRM = '"&pcc&"'
And ROMA10.GRM_ROM Is Null Terry

;-) The single biggest challenge to learning SQL programming is unlearning procedural programming. -Joe Celko

SQL Article links:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top