Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select union with empty rows
Message
 
 
To
27/07/2010 09:40:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01474117
Message ID:
01474131
Views:
74
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform