February 12, 2020 at 9:26 pm
Hi
I am using OLEDB to connect to an Oracle. I have two parameter which I want to use in my dataset query. What should I put for the parameter.
Dataset Query:
Parameter positions are indicated as YearParameter and MonthParameter
SELECT DATA_FACT2.HMO_ID, DATA_FACT2.HRS_AUTH, DATA_FACT2.HRS_PAID, DATA_FACT2.Year, DATA_FACT2.Month, DATA_FACT2.RPT_TYPE
FROM DATA_FACT2
WHERE (DATA_FACT2.Year = YearParameter) AND (DATA_FACT2.Month IN ('04', '05', '01', '02', '03')) AND (DATA_FACT2.Month = MonthParameter) AND (DATA_FACT2.RPT_TYPE = 'M') OR
(DATA_FACT2.Year = YearParameter) AND (DATA_FACT2.Month IN ('06', '07', '08', '09', '10', '11', '12')) AND (DATA_FACT2.Month = MonthParameter) AND (DATA_FACT2.RPT_TYPE = 'M')
ORDER BY DATA_FACT2.HMO_ID, DATA_FACT2.Month
Thank you very much.
Ijaz
February 12, 2020 at 10:19 pm
You really should use the Oracle Connection - and make sure you have installed the Oracle client on your workstation and the SSRS server.
If using the Oracle provider, your parameters would be defined with the prefix ':'. For example:
SELECT ... FROM ... WHERE p1 = :p1
If you must use OLEDB, the parameters are positional and denoted with a ?. For example:
SELECT ... FROM ... WHERE p1 = ?
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply