I’m trying to figure out how to assign my variables values pulled from a table in my database in Oracle Reports. This code lies in one of my user parameters:
function Project_idValidTrigger return boolean is
begin
:project_id := 'BMDSA';
SELECT VALUE into project_id from WOS_REPORT_PARAM where parameter = 'PROJECT_ID'and SEQUENCE_NUM := sequenceNum;
return (TRUE);
end;
The table in the database consists of 4 columns: SEQUENCE_NUM, SYS_DATE, VALUE, PARAMETER.
What I am trying to do is set my user parameter “Project_ID” with a value from my table that has the specified parameter and sequenceNum, sequenceNum being provided by another user parameter.
Hopefully I’m conveying what I need to do properly, Oracle Reports and SQL are still very new to me.
I think here is what you are looking for (considering
project_idandsequenceNumare your report parameters –Points to remember –
:=is used for assignment, so in short it cannot be used in aSQLquery. The report parameters act as bind variables inside the function denoted by:operator before the parameter name.