Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL select mind bender #1453
Message
 
To
21/07/1998 22:40:56
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00119932
Message ID:
00119985
Views:
22
Bruce,

Try this:
CREATE SQL VIEW apinquiry AS ;
select * from awards!apmaster where apmaster.invoicenum ;
   in (select apmaster.invoicenum
       from awards!apmaster ;
       GROUP BY invoice ;
       HAVING sum(apmaster.tranamount)<>0 ) ;
   GROUP BY invoicenum ORDER BY
   vendornum,invoicenum
>>
>>
>>CREATE SQL VIEW apinquiry AS ;
>>select * from awards!apmaster where apmaster.invoicenum ;
>>   in (select apmaster.vendornum, apmaster.invoicenum,
>>       sum(apmaster.tranamount) as sumamount where sumamount <> 0
>>       from awards!apmaster) GROUP BY invoicenum ORDER BY
>>       vendornum,invoicenum
>>
>>HTH
>>Barbara
>
>Good thought but when I do that I get a "Subquery is invalid" error.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform