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!

Using a variable db link for an interactive report

John Kolden-OracleNov 5 2013 — edited Nov 7 2013

I have a requirement where users will select an instance (db link) from an apex LOV and the data in an interactive report will query based on the db link selected.

I can use a db link in an interactive report query but only if I provide the exact name of the link. If I do something link select * from foo@:P12_DBLINK it doesn't work.

It seems my only option is to use something like apex_collection.create_collection_from_query and then I can build my query with dynamic sql and use a variable for the dblink name. Then I just create an IRR based on my collection.

Does that sound like that correct approach and/or am I missing anything?

Any suggestions are most appreciated,

john

This post has been answered by Vite DBA on Nov 6 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 5 2013
Added on Nov 5 2013
8 comments
1,230 views