on 08-27-2009 11:51 AM
Hi, I am facing the following problem.
My SQL Stored Procedure has one input parameter,and it returns three values.
I want to know the syntax for calling this stored procedure ie. syntax in fixed query in XMII.
Thanks.
Hi,
You have to use "FixedQuerywithOutput" and then use the word CALL instead of EXEC before stored procedure name.
Hope this helps.
Regards
Khaleel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Khaleelurrehman,
the query mode you have to use depends on the database you are working with. Mode "FixedQuerywithOutput" is only used for Oracle DBs. You can use it to retrieve for example the values delivered by a Ref Cursor.
For calling a SQL Server, you would use the mode "FixedQuery" to retrieve data with the EXECUTE or EXEC statement.
I suppose that Adam is using the SQL Server.
Regards
Michael
Hi,
Syntax for executiong SP in MII is:
execute stored_procedure_name '[Param.1]'
.
You can use Parameters tab in Query template.
Go throufg this link:
http://help.sap.com/saphelp_xmii115/helpdata/en/Connectors/IDBCConnector.htm
-Suresh
Edited by: Suresh Hiremath on Aug 27, 2009 1:40 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adam,
I assume that you are using MSSQL server stored procedure which outputs 3 values.
Say that you are inputting 1 integer @inval and returning 3 integer values @outval1, @outval2, @outval3 from Stored Procedure
Then perform the following in Query Template
DECLARE @val1 INT
DECLARE @val2 INT
DECLARE @val3 INT
EXEC StoredProcedureName
@inval = 10,
@outval1 = @val1 OUTPUT,
@outval2 = @val2 OUTPUT,
@outval3 = @val3 OUTPUT
SELECT @val1,@val2,@val3
Use FixedQuery mode
Regards,
Adarsh
Edited by: Adarsh Sidnoor on Aug 27, 2009 7:46 PM
Edited by: Adarsh Sidnoor on Aug 27, 2009 7:47 PM
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.