Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Help Needed to Speed Up the code
Message
De
29/07/2013 14:24:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL Help Needed to Speed Up the code
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01579372
Message ID:
01579372
Vues:
69
I am using the followin Scan Endscan loop to update the Target Path in a cursor.
But since my records are very huge, the processing is taking long-long times for updating.

Can anybody give me equivalant SQL that can work faster.

Here is my code
*This Program Will Update New_bill.dbf with New Target Path
SELECT New_bills
LOCATE
SCAN WHILE .NOT. EOF()
F=Filename
SELECT Master
LOCATE FOR accountno=F
IF FOUND()=.T.
E=ALLTRIM(Exchange)
ME=1 && Denotes that the exchgange is Not missing
ELSE
E="Missing Exchange"
ME=0 && Denotes that the exchange is Missing
ENDIF

SELECT New_bills
P='&tDirectory'+'&pBillmonth'+'-'+ALLTRIM(STR(pbillyear))+'\'+E+'\'+STR(filename)+'.ps'
Replace Newpath WITH P
Replace Missexg WITH ME
Disp_percent=Alltrim(Str(Recno()/RecordsForSelectA*100))
Wait Wind "Step-3 [Updating Target Path Information..."+Disp_percent+"%"+" Completed]"  Nowait
ENDSCAN
RETURN
Thanks in anticipation
Harsh
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform