Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tip of the Day -- SQL Subqueries
Message
From
30/09/1999 16:50:36
 
 
To
30/09/1999 13:27:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00271146
Message ID:
00271329
Views:
23
>Yup. Another interesting note for xBase DELETES and REPLACES. If you don't want to set a relation on a file, but need to update the contents based on the existence of a record in another table, you can use code like:
>
>REPLACE ChildTable.FK2 WITH ParentTablePK2 FOR SEEK(Childtable.FK1, "ParentTable", "PK1")
>
>Same goes for DELETES. You can delete all records whose key occurs in another table with syntax like:
>
>SELE MyTable
>DELETE FOR SEEK(MyTable.SomeField, "SomeOtherTable","SomeTag")

Thanks for adding this, Erik. Very useful.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Reply
Map
View

Click here to load this message in the networking platform