Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One SPT cursor to be used in another SPT
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01135239
Message ID:
01135247
Views:
18
Hi Borislav

>You could do this joing two ways:
>1. Use derived table with exact the same SELECT as first SPT cursor:
>...
>2. Select records w/o joining and than select jojned records using both SPT cursors in VFP.
>I personaly prefer first suggestion, because it is faster and you get all records you need directly.

Yes the first one worked perfectly. I was able to reuse the SQL statement, which was important just in case the SQL #1 should be ever changed. I had first tried a LEFT JOIN but one of the fields would not allow a NULL value so I did a simple JOIN will it affect the result set?

I was worried as the original WHERE clause was pretty complex but that did not seem to be an issue. The problem I did encounter was due to an ORDER BY in SQL #1, which I removed and put it into a VFP SELECT on cursor #1.

All in all it worked wonders. Thanks a lot.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform