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 Chris Miller 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
Feb 22, 2005
2
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top