SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insert values from sp help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pnpsql
Posting Yak Master

India
246 Posts

Posted - 03/14/2013 :  08:48:52  Show Profile  Reply with Quote
i want to execute a stored proc and insert all its values in a table. And i also want to insert an additional
value with columns that are inserted bt sp.

like my proc is :

create procedure test_proc
as
select 1 as num
union
select 2 as num

and my table is :
create table test_ins
(pid numeric(10) , num numeric(10) )

and when i run i want to insert @pid value in the table along with sp values.

declare @pid numeric(10) = 999
insert into test_ins(pid , num )
exec test_proc


kindly help





challenge everything
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000