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!

Use variable in SQL for column name

Andy1785Jun 18 2013 — edited Jul 2 2013

Hi All,

We want to use a user input as a column name in APEX.

For e.g user will enter "ALLOWABLE_AMOUNT" then the query will be as follows  :

select Rule,rule_name,rule_desc,"User Input" from rule_dim

where "User_input" > 100

So here the User_input will be substitued with Allowable_amount. Is this doable using any bind/substitution variables ? I tried ":P2_USER_VARIABLE" and "&P2_USER_VARIABLE." but did not work.

Please advice.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2013
Added on Jun 18 2013
10 comments
2,364 views