-
DB2 Crosstab Function
I am migrating data from Access to DB2. I am embedding my queries in my ASP pages and everything seems to be going well, however i am having problems finding a suitable feature in DB2 that will simulate an Access crosstab query. I believe a stored procedure will be my only option. This is OK, but i'm not very familiar with stored procedures. Here is an example of what i need:
I have a very simple table that looks like this (derived from a view):
CATEGORY SUMCAT SUBCATEGORY SUMSUB NAME DATERATING
-------- ------ ----------- ------ ---- ----------
APPROACH 2 ERROR 1 JOE 2005-12-12
LOGICAL 3 SUGGST. 3 JOHN 2005-11-11
I want to present that data like this:
Category / Subcategory NOV DEC
---------------------- --- ---
APPROACH 2
LOGICAL 3
ERROR 1
SUGGST 3
The date ranges will be defined in the ASP page and should be passed into the function that builds the crosstab.
Can anyone help me with this?
Thank you!
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
|
|