[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Running Totals (SQR 3.0.13.2), Oracle 7
- Subject: Re: Running Totals (SQR 3.0.13.2), Oracle 7
- From: Scott Barnes <sbarnes@MAIL.WESLEYAN.EDU>
- Date: Tue, 11 Jul 2000 08:36:04 -0400
- In-Reply-To: <19702FF23271D311A3B500805F590835025B5B4B@acsexch1.isic.atu .com>
I modified you code assuming that the variable in my add statement after
the to is all one variable name.
hope this helps
Scotty
At 12:49 PM 7/10/00 -0800, you wrote:
>Hi gang,
>
>I have managed to create several reports without asking for help, but it is
>time once again to seek your wisdom....
>
>I am writing a report which duplicates a spreadsheet - there are running
>totals for both columns and rows. I am having difficulty with the totals for
>the columns. The program selects 1st by employee and second by date....
>
>The output looks like the following (the number of check dates may vary):
>
> 1/1/2000 1/15/2000 Total
>AAA $ $ Total for row
>BBB $ $ Total for row
>Total total for column total for column
>
>I would like to great variables based on the check date, and then add the
>individual amounts to the variables.
>
>The example of what I want to accomplish is below. I do not know how to have
>a numeric variable created by the program. I can handle the "contents" of
>the variable, but how do I have the variable itself created? This may make
>no sense at all - if so, I appologize in advance :-)
>
>Thanks,
>Bryan
>
>begin-select
>a1.al_amount
>a1.check_dt
> move &a1.check_dt to #a1.check_dt
add #a1.check_dt to #total-check-&a1.check_dt
>! let #total-check-&a1.check_dt = #total-check-&a1.check_dt + &a1.check_dt
>
> From PS_AL_CHK_DED A1
> Where a1.check_dt between $first_date and $second_date
> and a1.al_dedcd = '64'
> and a1.file_nbr = &a.file_nbr
>
>end-Select
>
>
>
>------------------------------------------------------------
>Bryan E. Brown
>bbrown2@acsalaska.com, 907-564-1303
>Systems Analyst, ACS (Alaska Communication Systems)