Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change these codes into sql
Message
De
11/11/2006 12:30:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
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 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01168938
Message ID:
01168942
Vues:
16
I think he wants a "running total" - the value gets accumulated from one record to the next.

>Khubaib take a look at your code:
>
Replace balance With 0 All
>
>and after then
>
Replace balance With blnc &&& where blnc = blnc+debit-credit
>
>and
>
Set Filter To code=thisform.code.value &&& is in action
>
>May be you want
>
>update AccTran;
>  set Balance = blnc+debit-credit;
>  where Code = ThisForm.Code.Value
>
>
>
>>these code can be changes into sql
>>
>>Select accounts
>> Locate For code=thisform.code.value
>> opbl = opdr-opcr
>> Select acctran
>> Set Order To date
>> Set Filter To
>> Set Filter To code=thisform.code.value
>> Goto Top
>> Replace balance With 0 All
>> Goto Top
>> blnc = opbl
>> Do While !Eof()
>>     blnc = blnc+debit-credit
>>     Replace balance With blnc
>>     Skip
>> Enddo
>>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform