Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00004043
Message ID:
00004085
Views:
30
try something like this (i never remember the exact syntax, but this is close)
select lkacode.account, description, aie_code, budget, sum(achecks.amount);
from g:\artfox\aie\lkacode, g:\artfox\aie\achecks;
where lkacode.account = achecks.account;
and lkacode.aie_code = achecks.itemcode;
into table f:\artfox\aledsumm ;
union ;
select lkacode.account, space(30), space(10), space(10), 000000.00 from lkacode

note that w/ a union each of the select statements must produce the same table structure so adjust the 'filler' fields in the bottom select statement to fit your field size.




>Help, I am a rank SQL beginner...
>
>I am trying to produce a ledger summary report. I have a lookup table that includes some descriptive text, a budget amount, and a budget code. I want to produce a table that is like this with a field for amount spent. The amount spent should come from a check table, linked on the budget code. But, those budget codes that have not been used don't show up. I need those to show though. What am I doing wrong?
>
>Here is what I have so far...
>select lkacode.account, description, aie_code, budget, sum(achecks.amount);
> from g:\artfox\aie\lkacode, g:\artfox\aie\achecks;
> where lkacode.account = achecks.account;
> and lkacode.aie_code = achecks.itemcode;
> into table f:\artfox\aledsumm
Previous
Reply
Map
View

Click here to load this message in the networking platform