Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding orphan records
Message
 
 
To
23/01/2009 09:34:42
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01376524
Message ID:
01376527
Views:
11
>If I have a table that could be tied to a couple other tables, which could have dependents themselves, how could I find records that have no parent/grandparents?

select Child.* from Child LEFT JOIN Parent on Child.FK = Parent.PK where Parent.PK IS NULL

This query works faster than subselect.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform