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
 Other Forums
 Other Topics
 Linked server and stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-07 : 08:45:20
bego writes "Hi,
i have a problem with an stored procedure in oracle. My procedure is :

PROCEDURE Formato_Fecha_V (aNFecha NUMBER, aVFecha OUT VARCHAR2,DID OUT TT);

and i try to call it from sql server like this

set @sqlx = '{Call NEDAESDES.Paquete_Sql_Nedaes.Formato_Fecha_V('''+ @fechaN + ''',' + @aVFecha + '{resultset 20,did})}'
print (@sqlx)
set @comando = 'SELECT @aVFecha FROM OPENQUERY( DESA_Oracle ,'+@sqlx+')'
exec ( @comando )

but it doesn't work, i don`t know if the call sentence is ok or not and i can not find other way to call it. Can anybody help me quickly, please?"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-07 : 11:49:56
remove '{' and '}' from @sqlx

it depends on what is @aVFecha
set @comando = 'SELECT ' + @aVFecha + ' FROM OPENQUERY( DESA_Oracle ,'+@sqlx+')'
exec ( @comando )

hope it helps...

but for correct answer you will need to give us more info.

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -