Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 15 Oracle Analytics Lounge
- 208 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 76 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Bind Variable

Summary
Bind Variable
Content
Required to create a custom version of an Oracle Data definition to add a new field.
The Data Definition dataQuery sqlStatement's are mostly populated via a beforeReport package trigger
e.g.
<sqlStatement name="Q_SUMMARY_SELECT">
<![CDATA[
&P_SUMMARY_SQL_STATEMENT
AND :L_RUN_SUMMARY_REPORT = 'Y' ]]>
</sqlStatement>
Can I reference one of the fields within Q_SUMMARY_SELECT as a following Bind Varaible ?
I've tried but the value looks to be null.
I don't want to waste time on the impossible :-)
Thanks.
Answers
-
Apologies for any confusion.
The existing Data Definition includes sqlStatement Q_SUMMARY_SELECT which is populated via a PL/SQL package into &P_SUMMARY_SQL_STATEMENT.
I'm wanting to reference on of the output fields from that statement in a following sqlStatement definition.
I've tried using :COLUMN_NAME but request log shows [STATEMENT] 1: COLUMN_NAME:null
Before spending time with the code I was querying whether Bind Variables work as normal when the referenced column is within an external package generated statement.
Hope this is clear ?
0 -
Can I reference one of the fields within Q_SUMMARY_SELECT as a following Bind Varaible ?
Your question is not clear.
0 -
Hi,
It's not clear. As per my understanding, if there are two queries, you want to use first query column in second query. Right?
Then yes, bind variable is correct.
You can use like :First_col_column
Hope this will help you...
0 -
Not sure if this could be solution but, I think you can go for temporary table (which gets populated from pl/sql package )which can be used in another query
0 -
Not the solution that I was after, but some lateral thinking results in a different way round the issue.
<sqlStatement name="Q_SUMMARY_SELECT">
<![CDATA[
SELECT T.COLUMN_NAME,
J.*
FROM TABLE_NAME T
INNER JOIN ( &P_SUMMARY_SQL_STATEMENT
AND :L_RUN_SUMMARY_REPORT = 'Y' ) J
ON J.COLUMN_NAME = T.COLUMN_NAME ]]>
</sqlStatement>
Happy days.
Nice to know if there is a way around the null Bind Variable, though.
0