0
votes

This is my Query In SSRS Report:

SELECT
  GTCODE,
  COUNT(GTCODE),
  SUM(HLD_FLG),
  Reason
FROM ICWGHC.W_STOCKINFO
WHERE GTCODE IN (?GTC)
GROUP BY GTCODE, Reason;

I have Connected SSRS to ORACLE through ODBC. I have to pass the parameter GTC, I have created another Dataset for the parameter.

And when i execute the query i get this message

ERROR ORA 00907 missing right parenthesis

Please help me.

1

1 Answers

0
votes

For ODBC data sources, no need to specify the parameter name after the question mark. You can use

SELECT
  GTCODE,
  COUNT(GTCODE),
  SUM(HLD_FLG),
  Reason
FROM ICWGHC.W_STOCKINFO
WHERE GTCODE IN (?)
GROUP BY GTCODE, Reason;

After editing the query go to the parameters tab to correctly map the parameter. Replace the Parameter value with (assuming your parameter name is GTC):

=Join(Parameters!GTC.Value,",")