Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Select statement
Message
From
06/06/2001 10:05:47
Walter Meester
HoogkarspelNetherlands
 
 
To
06/06/2001 08:07:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00515639
Message ID:
00515741
Views:
14
Hi kevin,

Another approach would be
SELECT * FROM TABLE1 WHERE !SEEK(PrimaryKey,"TABLE2","table2_PK")
or when the table2 does not contain deleted records or the primary key is filtered with FOR !DELETED() you could tune performance by using:
SELECT Table2
nIndexNumber=TAGNO("Table2_pk")
SELECT * FROM TABLE1 WHERE !KEYMATCH(PrimaryKEy,nIndexnumber,"TABLE2")
I hope this helps.

Walter,

>Hi
>
>Table1 is related to Table2.
>
>I want to run a SELECT on Table1 and only obtain records that DO NOT have a related record in Table2.
>
>Can anyone help me on this.
>Thanks
>Kev
Previous
Reply
Map
View

Click here to load this message in the networking platform