-
Two-Dimensional array
I Declared a Two-Dimensional array, people(3,20)
In this array there are 20 rows( second dimension) and 3 columns( first
dimension), what i mean is: below you can see the statuses of this array's
first dimension
0-name
1-city
2-quantity
I want to group the rows with the same value( at the "name" column) which
are at the array's first dimension's zeroth value.And, to have the sum of
values of the "quantity" column and in this way,create a new array.
Briefly,what i want to do is, to exactly use the "GROUP-BY" functionality at
T-SQL. For example if this array was in a database,we could turn with
recordset like this:
SELECT name, SUM ( quantity), FROM (people) GROUP BY name
There is an alternative way .i can put the "people" array in a table and run
the process from there.
But i wonder how i can solve this problem in a better way.
Waiting for your suggestions...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks