[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Array
- Subject: Re: [sqr-users] Array
- From: "George Jansen" <GJANSEN@aflcio.org>
- Date: Thu, 29 Jan 2004 09:21:36 -0500
- List-id: This list is for discussion about the SQR database reporting language from Hyperion. <sqr-users.sqrug.org>
What is your data source? If a relational database, why not write your
SELECT as
SELECT id, sum(nbr) as nbr
FROM whatever
GROUP BY id
>>> darrel_1977@yahoo.com 01/29/04 08:51AM >>>
Hello Fellow SQR'ers...
I'm wondering if anyone out there can assist me.
I'm working with an array with two numeric values (#ID & #NBR) in which
when loaded into the array can look like the output below...
*********************
#ID: 001
#NBR: 123456
#ID: 002
#NBR: 987456
#ID: 003
#NBR: 555444
#ID: 001
#NBR: 000111
*********************
As you can see I have two instances of the #ID variable (which is
expected). Is it possible to sum the #NBR variable for both (or however
many) instances of the #ID and pass that total into a new variable? I
guess I'm looking for a FOR-EACH type of a loop or some type of array
sort, but I've been unable to find any documentation to assist in this
situation.
BTW....my load array logic is below...
---------------------------------------------------
Begin-Procedure Load-Array
Let #Ctr=0
While #Ctr <= #i - 1
If #Ctr > #i - 1
break
End-If
Get #ID #NBR
From DataArray(#Ctr)
Add 1 to #Ctr
#Debug Show 'ID: '#ID !-- TEST
#Debug Show 'NBR: '#NBR !-- TEST
End-While
Let #ID=0
Let #NBR=0
End-Procedure
---------------------------------------------------
Any assistance would be greatly appreciated.
Thanks,
Darrel
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
_______________________________________________
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