Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select union with empty rows
Message
 
 
À
27/07/2010 09:40:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01474117
Message ID:
01474131
Vues:
73
This should work. The FULL JOIN curClient ON .T. emulates a CROSS JOIN that VFP does not support
SELECT curClient.cName, CAST(NVL(curOrder.nAmount, 0.00) AS N(8,2)) AS Amount, curOrdertype.cType ;
	FROM curOrdertype FULL JOIN curClient ON .T. ;
		LEFT JOIN curOrder ON curOrder.iOrdertype = curOrdertype.ID ;
			AND curOrder.iClient = curClient.ID ;
	ORDER BY curClient.ID, curOrdertype.ID 			
>
>exactly! However if I 'extend' this little example with
>
>insert into curOrdertype values(3,"nbrthree")
>
>and
>
>insert into curClient values(4,"George")
>
>this will give me a 0.00 for all orders ;(
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform