In SQL Server 2005... with some 11K rows
I am having two tables T1 and T2(as bkup of T1), now i need one column data of T2 as i accidently updated T1 column data, (Update T1.colx with T2.colx)
I tried with
<code> update T1 set colx=(select colx from T2) </code>
but this is syntactically wrong as subquery returns multiple rows,
If i try with..
<code> insert into T1 (colx) select T2.colx from T2 as T2_1 cross join T2 </code> it will append and i dont need to append but update....
Copy paste is also not working... Can some one help !!!
I am having two tables T1 and T2(as bkup of T1), now i need one column data of T2 as i accidently updated T1 column data, (Update T1.colx with T2.colx)
I tried with
<code> update T1 set colx=(select colx from T2) </code>
but this is syntactically wrong as subquery returns multiple rows,
If i try with..
<code> insert into T1 (colx) select T2.colx from T2 as T2_1 cross join T2 </code> it will append and i dont need to append but update....
Copy paste is also not working... Can some one help !!!
Comment