Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL UPDATE Question
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01090513
Message ID:
01090535
Vues:
13
No, what I'm looking for is a way to update a set of records in SQL.

There will be any number of field in any number of records that need to be
updated.

Is there a batch update process I can use?





>>Is there any way to do the following with one command, such as a batch update?
>>
>>
>>
>>SELECT MyTable
>>SCAN
>>
>>  cCommand = "update thesqltable set thefield = 'This Value' where id = " + TRANSFORM(MyTable.id)
>>
>>  =SQLEXEC(nHandle, cCommand)
>>
>>ENDSCAN
>>
>
>I think this post must be in VFP Forum, not here, but:
>
>SELECT MyTable
>lcList = []
>SCAN
>  m.lcList = m.lcList + IIF(EMPTY(m.lcList),[],[,]) + TRANSFORM(MyTable.id)
>ENDSCAN
>cCommand = "update thesqltable set thefield = 'This Value' where id IN (" +  m.lcList + ")"
>=SQLEXEC(nHandle, cCommand)
>
>(not tested)
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform