Can anyone tell me how to insert a record in a table in the following case:
I have 2 tables:
create table #temp1(c4 int, c5 int,c3 int)
...and:
create table #temp2(c1 int, c2 int)
create procedure sptemp
as
begin
select c1,c2 from #temp2
end
Now I want to insert records into #temp1 table using the procedure as:
insert into #temp1(c4,c5,c3)
In the above statement, first 2 values(c4,c5) should be from procedure(exec sptemp) and the third value will be using (ex: values(34)).
Please suggest me the way to implement.