I am trying to write an Oracle query that has some variables set before the query, which I can then refer to in the query.
I can do the following in SQL Server:
DECLARE @ReviewID as VARCHAR(3)
DECLARE @ReviewYear AS VARCHAR(4)
SET @ReviewID = 'SAR'
SET @ReviewYear = '1011'
select * from table1 where review_id = @ReviewID and acad_period = @reviewyear
What is the Oracle equivalent above? I tried cursors and bound variables, but obviously I'm doing something wrong, as these methods do not work.
The Oracle query is designed to go to the OLEDB source in SSIS, and then the variables will be set from the package level variables.
source
share