[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Help with summing column not in selectstatement



Not sure what you mean, but here is an example:

Sample Table
========
ID
COST
UNITS

begin-procedure get-totals
Let #RUN_TOTAL = 0
begin-select
A.ID
A.COST
A.UNITS
  Let #RUN_TOTAL = #RUN_TOTAL + &A.COST
  show 'ID = ' &A.ID ' UNITS = ' &A.UNITS ' COST= ' &A.COST ' RUNNING COST = ' 
#RUN_TOTAL
from UNITS_COST_TBL A
end-select
end-procedure

Is that what you mean?
  



******************************
Larry Roux
Syracuse University
lroux@syr.edu
*******************************

>>> mc_integra8@yahoo.ca 04/27/04 04:25PM >>>
Hi
 
I am wondering if I can do the following in SQR:
 
I have a table with x no of columns, and in the SQR program, I do not want to 
select a certain column but I want to do a rolling total.  How do I do this?
 
Here is all the versio info:
 
SQR: SQR/3.0.12.3/Sun/Solaris 2.4/Sybase 4.9.2/Mar 19 1996
Unix:  Solaris OS V2.8, 
database: Sybase V11.9.2
 
Thanks in advance
Martha





---------------------------------
Post your free ad now! Yahoo! Canada Personals

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users