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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to identify items not in tableA that are in tableB 1

Status
Not open for further replies.

awise

IS-IT--Management
Dec 11, 2001
85
Can someone assist me with a query that will return the records of Table A where those records are not in Table B

Comparing to inventory tables, one the master, the other the pricing table. Items were accidently deleted from the master, so I need to remove the associated record from the pricing table. Item Number is the primary key.

Thank you,

zaw
 
Code:
SELECT TableA.*
FROM TableA
LEFT JOIN TableB ON TableA.PK = TableB.FK
WHERE TableB.FK IS NULL

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
 
Many thanks.

Your template worked perfectly for what I needed.

zaw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top