Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select union with empty rows
Message
 
 
To
07/08/2010 15:45:20
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:
01475622
Views:
44
>>
>>
>>CREATE CURSOR curOrder (id i ,iClient i, nAmount n(8,2), iOrderType i ) 
>>INSERT INTO curOrder VALUES( 1, 1, 100.00, 1)
>>INSERT INTO curOrder VALUES( 2, 2, 110.00, 1)
>>INSERT INTO curOrder VALUES( 3, 2, 120.00, 2)
>>
>>
>>CREATE CURSOR curOrdertype (ID i, cType c(10))
>>INSERT INTO curOrdertype values(1,"import")
>>INSERT into curOrdertype VALUES(2,"export")
>>
>>CREATE CURSOR curClient (ID i, cName c(10))
>>INSERT INTO curClient values(1,"john")
>>INSERT INTO curClient values(2,"pete")
>>INSERT INTO curClient values(3,"eva")
>>
>>SELECT curOrdertype.cType;
>>	, NVL(curOrder.nAmount,0) nAmount;
>>	, curClient.ID iClient;
>>	, curClient.cName ;
>>	FROM curClient ;
>>		 JOIN curOrdertype ON .T.;
>>	LEFT JOIN curOrder ON curOrder.iOrdertype = curOrdertype.ID AND curClient.ID = curOrder.iClient;
>>	ORDER BY 3,4
>>
>Fabio,
>Thank you a clever solution.


Hah? How is it different from what I posted a week ago <B>Re: SQL Select union with empty rows</B> Message #1474131 ?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform