sql - INSERT ONLY SPECIFIC COLUMN FROM A STORED PROCEDURE RESULT -
i want know if possible insert table specific column of result stored procedure?
something like:
declare @temp table( id int ) insert @temp exec getlistofstudents --returns multiple columns
this example only, help..
you can take 2 step approach. first insert #temptable, populate @tempvariable insert into, selecting single column.
declare @temp table ( id int ); create table #temptable1 ( column1 int, column2 int ); insert #temptable1 exec getlistofstudents insert @temp select column1 #temptable1
Comments
Post a Comment