Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ANSI SQL equivalent of a VFP SQL statement
Message
From
14/12/2004 13:19:13
 
 
To
14/12/2004 12:36:50
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00969164
Message ID:
00969181
Views:
12
Use CASE statements.


How do you build the equivalent of the following Visual FoxPro statement in ANSI SQL for SQLPT?
SELECT Header.*, ;
       ROUND(SUM(IIF(ChildCondition1,Child.Qty,0)),2) AS Qty1, ;
       ROUND(SUM(IIF(ChildCondition2,Child.Qty,0)),2) AS Qty2, ;
       ROUND(SUM(IIF(ChildCondition3,Child.Qty,0)),2) AS Qty3 ;
  FROM Header ;
  JOIN Child ON Header.HeaderID = Child.HeaderID
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform