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

SQL Query

Status
Not open for further replies.

jaygeemack

Programmer
Joined
Feb 22, 2005
Messages
2
Location
GB
I am using VFP9, and have a problem with SQL.

I have two cursors with identical structures. Each table has a unique field, p_key. I want to find the records which are in cursor1, but not in cursor2, based on the value of p_key.

Any ideas?

TIA

James McKelvie
 

Code:
SELECT *;
   FROM Cursor1;
   WHERE P_Key NOT IN (SELECT DISTINCT P_Key FROM Cursor2)

Good Luck,
JRB-Bldr
 
Thanks, jrbbldr, it worked a treat.

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top