Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do while problem
Message
 
À
03/06/2005 03:20:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01019676
Message ID:
01019705
Vues:
19
This message has been marked as the solution to the initial question of the thread.
SELECT VOUCHERS
*** NEVER use a functions as ALLTRIM, LTRIM or RTRIM in INDEX expresion
*** or If you have to, make sure that after their use you make the expresion with constant lenght
INDEX ON DTOS(DATE) + STR(VOU_NO, 5) + PADR(ALLTRIM(VOU_TYPE), 20) TO VOUCHERS1 

SELECT vou_sum
INDEX ON DTOS(DATE) + STR(VOU_NO, 5) + VOU_TYPE TO VOU_SUM1

SELECT VOUCHERS
REPLACE all d1 with ""

SELECT vou_sum
SCAN
   cc = PADR(ALLTRIM(Vou_Sum.Vou_Type),20) && character type
   SELECT VOUCHERS
   SEEK DTOS(Vou_Sum.Date)+STR(Vou_Sum.Vou_No,5)+ cc
   IF Found()
      REPLACE D1 WITH Vou_Sum.D1 WHILE;
                                 DTOS(DATE) + STR(VOU_NO, 5) + PADR(ALLTRIM(VOU_TYPE), 20) == DTOS(Vou_Sum.Date)+STR(Vou_Sum.Vou_No,5)+ cc
   ENDIF
   SELECT Vou_Sum
ENDSCAN
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform