COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: nexgen on 10 Feb 2012 03:25:51 AM

Title: Issue With Stored Procedure
Post by: nexgen on 10 Feb 2012 03:25:51 AM
Hi All,

I have defined following stored procedure(macro)  in the Terdata (database):

REPLACE MACRO SP_MACRO_3 (SID INTEGER,S_FREQUENCY VARCHAR(10))
AS (
SELECT SID, BU_ID, SF_CODE, S_IND
FROM   TableS
WHERE SID IN (:SID) AND
    S_FREQUENCY  in ( :S_FREQUENCY);

);

Please Note this a simple select statement from a table where filters are put according to parameters passed. Also Note, All the columns which are displayed are integer except S_ID which is Varchar.

This is giving me an error in report studio (and not in framework):

RQP-DEF-0177 An error occurred while performing operation 'sqlOpenResult' status='-28'. UDA-SQL-0114 The cursor supplied to the operation "sqlOpenResult" is inactive. UDA-SQL-0283 Metadata describing 'S_IND'; does not match results from the database.

This works fine on framework and I am able to test it and see the result set, When I remove column S_IND (which is a varchar ) , it run fines. Can any one Tell  me what the issue can be?

Thanks in advance.

I have already tried following link resolution which is not working:

http://www-01.ibm.com/support/docview.wss?uid=swg21342310
Title: Re: Issue With Stored Procedure
Post by: blom0344 on 10 Feb 2012 04:10:59 PM
No idea about the generated error code, but why on earth do you call a stored procedure when you can define all of it in a Cognos SQL subject?
Title: Re: Issue With Stored Procedure
Post by: Mary11 on 10 Jul 2013 10:00:10 PM
Hi nexgen,
Even i m getting same kind of error. I would be helpful if you can post the solution