Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS SQL Server Query Question
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
MS SQL Server Query Question
Divers
Thread ID:
01487855
Message ID:
01487855
Vues:
99
I want to write an SQL script for MS SQL Server that would update data in one table with information in another table where the two tables relate on a common field. In FoxPro I would have just opened table1 and then did a scan loop. Inside the scan loop I would do an UPDATE to update the field in table2 with the information from a field in table1.

So let's say we have the following:

TABLE1.recid (related) TABLE2.recid
TABLE1.field1 TABLE2.field2

I want to update TABLE2.field2 with whatever is in TABLE1.field1 and the two tables are related by recid. Since I can't do a scan loop in the SQL Query, how would I accomplish this?
Don Knoup
don.knoup@ticomix.com
Ticomix, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform