Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LEFT JOIN and complex criteria
Message
 
 
To
25/09/2006 13:32:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01156530
Message ID:
01157042
Views:
16
>I have trust in this
>
>SELECT TI.cTrans_fk, TI.cInsurances_fk;
>    FROM (select curTemp.cTrans_pk , max(T.iSequence_Number) iSequence_Number;
>	    	from curTemp JOIN Trans_Insurances T ON curTemp.cTrans_pk = T.cTrans_fk ;
>		    GROUP BY 1) X ;
>		    JOIN Trans_Insurances TI ;
>                 ON TI.cTrans_fk = X.cTrans_pk AND TI.iSequence_Number = X.iSequence_Number;
> into cursor curTemp1
>
Seems to be a little bit faster, but still quite slow...
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