Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Help Needed to Speed Up the code
Message
De
30/07/2013 14:52:09
 
 
À
30/07/2013 13:00:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
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:
01579475
Vues:
55
Thanks, i will check it up and intimate.

>>Instead, If I try this code it seems to work some faster
>>
>>Update New_bills Set Exchange=(Select Exchange From Master Where Master.Accountno=New_bills.filename) and after getting the name of exchange in My New_bills I will Update Newpath.
>>
>>But the problem using the above command is that I get NULL Values in the field exchange for the filename with are not accountno in Master.dbf, Instead of NULL Values I need 'MISSING EXCHANGE'.
>>
>>I.e for the values for which there is match I need the proper exchange code and for which there is no match I need 'Missing exchange'
>>
>>The SQL code which you provided earlier perhaps dont take E into consideration. E=ALLTRIM(Exchange) in my origininal code.
>>
>
>Yes, I failed to notice that you were actually using the value of E. Not difficult to change the code I gave you, though:
>
>>cPath = ADDBS(tDirectory+pBillmonth+'-'+ALLTRIM(STR(pbillyear)))
>
>
>* Handle the ones that match first.
>UPDATE NewBills ;
>  SET MissExg = 1, ;
>          NewPath = FORCEPATH(FORCEEXT(FileName, "PS")+"\" + ALLTRIM(Master.Exchange), m.cPath) ;
>  FROM Master ;
>  WHERE NewBills.FileName = Master.AccountNo
>
>* Handle the ones with no match.
>UPDATE NewBills ;
>  SET MissExg = 0, ;
>          NewPath = "Missing Exchange";
>  WHERE FileName NOT IN (SELECT AccountNo FROM Master)
>
>
>Tamar
Harsh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform