Dynamic sql [message #992062] |
Thu, 20 December 2012 14:28  |
Eclipse User |
|
|
|
I have two views, which has multiple versions. Each version is dynamically created, which is as part of design.
For the report design I need to union all the 2 views,all the versions that are available at the time of report execution.
Please find the attached report design. Here in this report I am able to exceute union all on one view.
Please suggest how to execute the same on multiple views.
Thanks
Amarnath A
[Updated on: Wed, 16 January 2013 16:11] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Dynamic sql [message #1000936 is a reply to message #1000443] |
Tue, 15 January 2013 13:12   |
Eclipse User |
|
|
|
I tried with
Case 4 :
Replace both "scriptSelect" and "scriptSelect1" replaced by qt?
this.queryText = this.queryText.replace("scriptSelect1",qt).replace("scriptSelect1",qt);
It throws the error : table or view does not exist
Case 5: "scriptSelect1" and "scriptSelect2" as placeholders
this.queryText = this.queryText.replace("scriptSelect1",qt).replace("scriptSelect1",qt);
this.queryText = this.queryText.replace("scriptSelect2",qt).replace("scriptSelect2",qt);
This is working for
qt = "select * from RPT_ASSET_REQUEST_36";
qt1 = "select * from RPT_ASSET_REQUEST_36 ";
But throwing the error "table doesn't exist " when I tried the below:
qt = "select * from RPT_ASSET_REQUEST_36";
qt1 = "select * from RPT_ASSET_REQUEST_PROPERTY_36 ";
this.queryText = this.queryText.replace("scriptSelect1",qt).replace("scriptSelect1",qt);
this.queryText = this.queryText.replace("scriptSelect2",qt).replace("scriptSelect2",qt);
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07755 seconds