Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Functions in a select
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01341594
Message ID:
01341631
Views:
17
This message has been marked as the solution to the initial question of the thread.
>
select R.*, CAST(NVL(Expended,0) as I) as expended from rta_elements R LEFT JOIN
(   select  sum(amount) as Expended, val(substr(sponsor_id,5,2))  as GroupID ;
from tip ;
inner join ledger on ledger.tip_id = tip.tip_id and source="RTA" ;
group by 2) MyAmount ON R.ElementNum = myAmount.GroupID
I believe this is what you actually wanted, correct?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform