Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
End of file encountered
Message
De
08/07/2005 13:25:55
 
 
À
08/07/2005 13:14:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01030354
Message ID:
01030611
Vues:
20
i see,
thank you.

>Look, I said to you I don't know what your replace line is supposed to be doing. UI haven't your tables or your set-up. I hoped my sample would provide a simplified basis for you to go on. Now comes the next bit in programming: debugging! Why not try it?
>
>Also, Tore's suggestion of learning some SQL would be a good idea.
>
>>hi,
>>this code make sum for one divi as under but i have more one divi
>>
>>ex if i have divi as
>>
>>A  12345
>>A  12345
>>A  12345
>>B  0    IT MUST BE ex 632514
>>B  0
>>.
>>.
>>.
>>C  0
>>.
>>.
>>
>>-------------------------
>>thanks.
>>>M.
>>>
>>>1. You never seem to listen! You're getting in a muddle with skip again when several people over the years have advised you to use scan.
>>>2. Next, Sum takes you to the bottom of the file, and you don't return to where you were before (not storing the recno to GOTO). So you only get the one.
>>>3. Even if it DID sum each set it means you're travelling through the table many times.
>>>4. Assuming tot_t is a field in the table, why not tot it up as you go?
>>>e.g.
>>>
>>>
>>>Select curbilldata
>>>SCAN
>>>  m.divi =  curbilldata.divi
>>>  m.r    = 0
>>>  Scan Rest while m.divi = curbilldata.divi
>>>    m.r = m.r + tot_t
>>>  EndScan
>>>
>>>* I don't know what you're doing with this next line
>>>* Seems all the records in the range of the inner scan will get the same  tot_tot value
>>>* and will ruin you file pointer. Reconsider.
>>>* ___________________________________________
>>>  replace tot_tot WITH m.r/2 for m.divi = curbilldata.divi
>>>
>>>EndSCAN
>>>
>>>
>>>Terry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform