Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated select via VfpOleDb
Message
De
14/04/2010 17:57:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
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 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01460193
Message ID:
01460209
Vues:
43
>Why not use derived tables instead of intermediate cursors?

That's what I tried first, and it works in VFP proper, but seems to be a bit complicated for the VfpOleDb driver. In metacode, like this:
SELECT distinct {fieldlist from three tables}
	from table1 
	join table2 on {expr1} and {expr2}
	LEFT JOIN table3 cc ON {expr3}
	LEFT JOIN table3 dd on  {expr4}
	LEFT JOIN table3 ee on  {expr5}
	left join (SELECT  {fieldlist2};
			FROM t_table1;
			JOIN table4 ON  {expr6};
			join (select max(datefield) as startdate, etc... group by ....) r2 ;
				on  {expr7};
			join table2  {expr1} and  {expr7};
			WHERE  {expr8};
		union SELECT  {similar except some of the logical expressions are different}) as part2 on {expr9};
        where {expr10}

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform