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
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 executea and call sp

Author  Topic 

PatDeV
Posting Yak Master

197 Posts

Posted - 2009-08-02 : 16:55:11
Hi all,

I am lost to do this:

@id = 'select disctint id from idtable'
@sp1 = 'select sp1 from table where key = '143''
@sp2 = 'select sp2 from table where key = '143''
@sp3 = 'select sp3 from table where key = '143''
@sp4 = 'select sp4 from table where key = '143''

Exec sp_data_cont 143, 234, @id, @sp1, @sp2, @sp3, @sp4

how can i pass values to parameters!?

please guide!!

Thanks
pat

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-08-03 : 13:27:09
select @id = distinct id from idtable
select @sp1 = sp1 from table where key = '143'
...


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -