Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 9.0 Take long time to process
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01066088
Message ID:
01066120
Views:
18
This message has been marked as the solution to the initial question of the thread.
Do you have an index on str(ctctrannum,6)+cjobid?

I believe, there is a bug on STR() in VFP9. AFAIK it's fixed in VFP9 SP beta, so it's going to be fixed in SP. I'm not sure of workaround except finding all cases with STR in select and handling on one to one basis.

>Nadya or Naomi:
>
>I get confused. Nevermind. Anyway nice to hear from you again.
>
>Here is the code that one of the programmer found that was causing problem.
>//////////////////////////////////////////////////////////
>*!* Select Max(Month(dprdend)) As curmonth ;
>*!* from tcrec ;
>*!* where Year(dprdend) = YEAR(sys_date) And ;
>*!* cadjnum = 99 And ;
>*!* &retronum And ;
>*!* str(ctctrannum,6)+cjobid In (Select Distinct Str(ctctrannum,6)+cjobid From tcded Where Between(cwhldid, 9, 14)) ;
>*!* into Cursor 'maxmonth' + Thisform.tmpname
>
>Select Distinct Str(ctctrannum,6) + cjobid As checkid ;
> From tcded ;
> Where Between(cwhldid, 9, 14) ;
> INTO Cursor ed1
>
>Select *, Str(ctctrannum,6) + cjobid As newid ;
> From tcrec ;
> INTO Cursor tcrec1
>
>Select tcrec1.* ;
> FROM tcrec1, ed1 ;
> WHERE newid = checkid ;
> INTO Cursor ed2
>
>Select Max(Month(dprdend)) As curmonth ;
> from ed2 ;
> where Year(dprdend) = Year(sys_date) And ;
> cadjnum = 99 And ;
> &retronum ;
> into Cursor 'maxmonth' + Thisform.tmpname
>///////////////////////////////////////////////////////
>
>The one that have the comment is the original code then he brake the select in several one. Did you know a quick fix for this. Otherwise we need to get out of 9.0 until we fix all the SQL statement.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform