March 6, 2012 at 7:08 am
Hi,
I have to insert into a table (t2) from other table (t1) with stored proc. I will use insert into t2.. select .. from t1, but I have to insert some additional field that are not part of t1, this is basically a variable.
here is the scenario
var = SidKey (col3)
Insert into t2 (col1,col2,col3)
select
col1,
Col2,
from t1
now will it be possible that I may include SidKey as Col3 ?
March 6, 2012 at 7:19 am
Insert into t2 (col1,col2,col3)
select
col1,
Col2,
@Variable
from t1
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 7, 2012 at 9:21 am
thank you Gail Shaw
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply