Hi,
I am creating crystal reports out of oracle stored procedure. I have different queries in my stored procedure which is using IN statement.
Eg:
SELECT replace(shipper_name,'\',' ') as shipper,
sum(teus / cntSailings) as teus
FROM VW_CONTRIBUTION,
VW_TOTAL_SAILINGS
WHERE VW_CONTRIBUTION.dir = VW_TOTAL_SAILINGS.DIR
AND VW_CONTRIBUTION.Principal = arg_principal
AND VW_CONTRIBUTION.line in ( arg_service )
Here 'arg_service' is an argument passed to the procedure. When I call the report with multiple service lines, the query is not working properly and not returning any rows. I am passing the values as comma separated String(varchar2)
Eg : arg_service = Q1,P1,A1
But when there's only a single value for 'arg_service'( Q1 ), query is working perfectly. Can anybody suggest me a solution for this?
Thanks,
sv.
I am creating crystal reports out of oracle stored procedure. I have different queries in my stored procedure which is using IN statement.
Eg:
SELECT replace(shipper_name,'\',' ') as shipper,
sum(teus / cntSailings) as teus
FROM VW_CONTRIBUTION,
VW_TOTAL_SAILINGS
WHERE VW_CONTRIBUTION.dir = VW_TOTAL_SAILINGS.DIR
AND VW_CONTRIBUTION.Principal = arg_principal
AND VW_CONTRIBUTION.line in ( arg_service )
Here 'arg_service' is an argument passed to the procedure. When I call the report with multiple service lines, the query is not working properly and not returning any rows. I am passing the values as comma separated String(varchar2)
Eg : arg_service = Q1,P1,A1
But when there's only a single value for 'arg_service'( Q1 ), query is working perfectly. Can anybody suggest me a solution for this?
Thanks,
sv.