Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert into sql query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01400726
Message ID:
01400738
Vues:
38
>>>how these codes will work in sqL
>>>
>>>select accounts
>>> 
>>> Locate For code=thisform.code.value
>>> opbl = opdr-opcr
>>>  
>>> sele student
>>> Set Order To date
>>> Set Filter To
>>> Set Filter To code=thisform.code.value
>>> 
>>> Goto Top
>>> Replace balance With 0 All
>>> Goto Top
>>> dfgblnc = opbl
>>> Do While !Eof()
>>>    dfgblnc = dfgblnc+debit-credit
>>>     Replace balance With dfgblnc
>>>     Skip
>>> Enddo
>>>
>>
>>
>>
>>
>>myCode = thisform.code.value
>>UPDATE Accounts;
>>       SET Balance = opdr-opcr+debit-credit;
>>WHERE Code == m.myCode
>>
>
>I may be wrong, but this code
>
>dfgblnc = dfgblnc+debit-credit
>
>seemed to me like incrementing on each record, while your code updates balance based on the current record values.
>
>Though your code makes more sense.


OOOOOOOOOOPS!!!!!
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform