Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 help needed in calling the procedure

Author  Topic 

sqllover
Constraint Violating Yak Guru

338 Posts

Posted - 2010-04-09 : 01:47:18
I have some store procedure in oracle.i am calling it from sqlserver2008. my sqlserver2008 and oracle are linkedserver.So i am using the following code to call the oracle procedure from sqlserver.

set nocount on
DECLARE @variable varchar(5),@string_variable varchar(5)
EXEC ( 'call CCOM.GET_HDSPROV_OPTOUT_INFO1(?,?,?,?)', '1','x','1',@variable OUTPUT) at DCCOM
print @variable


This is working for retreiving single value.inorder to retreive all values how should i modify the query, please help me in this

RobertKaucher
Posting Yak Master

169 Posts

Posted - 2010-04-09 : 10:41:53
What does the sproc return when run on the Oracle server?

===
http://www.ElementalSQL.com/
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-11 : 03:16:53
are you asking a way to execute this proc for all values in some other resultset/table? if procedure can handle only one value at a time then you have no other way than loop through and call proc once for each of values inside. Otherwise you need to rewrite proc in such a way that it receives a group of value and do required procession on them

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-04-11 : 06:36:33
Could you post the Stored procedure content?

Jack Vamvas
--------------------
http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -