Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing a column name as a parameter

ichinApr 13 2009 — edited Apr 14 2009
Good afternoon,

I was wondering if any of you ever encountered the following situation and found a method to get around it...

I recently created a pivot table using the SQL Query (PL/SQL function body returning SQL query) option.

The table consisted of the following information:
- Date range, Object Type and count.

The final table looks something like this (pardon the lack of fancy markup, hopefully it will get the point across):
Date        Object A    Object B    Object D    Object G
01-apr-09   10           16         50          43
02-apr-09   1            15         77          35
03-apr-09   19           0          14          17
04-apr-09   15           7          70          20
05-apr-09   7            6          65          50
And it goes on like that.
I had to create the code dynamically because I don't know what Objects I will get in any given date range (for example: I could have something for Object C and nothing for Object D in the month of March). I had a cursor loop through the object types before creating the SQL query that builds the table above.

The table is now working fine. What I'm trying to do now is do a little bit of drilling down in data.

Since everything is dynamically built, I can't give actual column names in my report. Is there any way that, when I click on, for example, the "10" on April 1st in Object A that the column header "Object A" gets passed? #COL02# only passes the value "10" which isn't what I want, and I tried the other variations such as :COL02 and &COL02. without much luck.

If you could shed some light on this problem, that would be greatly appreciated!

Thank you for your time.

Ivan
This post has been answered by munky on Apr 14 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 12 2009
Added on Apr 13 2009
4 comments
1,508 views