Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip of the Day -- SQL Subqueries
Message
 
 
À
30/09/1999 13:27:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00271146
Message ID:
00271329
Vues:
30
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform