Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One SPT cursor to be used in another SPT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Divers
Thread ID:
01135239
Message ID:
01135247
Vues:
19
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
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform