Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF syntax
Message
De
29/09/2015 17:25:50
 
 
À
15/09/2015 10:07:15
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01624559
Message ID:
01625203
Vues:
62
>>Hi Karen
>>
>>First things first - design. The point of databases is not to do things Row By Agonizing Row, but to think in terms of sets. It is very rare to write a replace command to affect one record. If you are doing that, to me, it suggests this is happening inside a larger loop. 1 replace commands such as this
>
>Design?
>If one like to change multiple records there is SQL UPDATE. Why learning outdated syntax? Is there realy a sense in NEXT xx or WHILE xx? The data should not depend on order .... (Except you are dealing with VFP sources like vcx,scx frx ....)
>
>The good on REPLACE is that it can be used on a single record without any change of record pointer and superfluous expression. Here it has a great advantage to SQL UPDATE. So I would do what the OP seems to do (altering a field on a condition) on some pre-save checks on record level using REPLACE.

The set unordered concept it is good with SQL SELECT because there is the ORDER BY clause.

Exists an ORDER BY with SQL UPDATE ? No.
There are application cases where an UPDATE with an ordered sequence it's necessary ? sure.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform