Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vip
Starting Member
4 Posts |
Posted - 2014-10-29 : 15:00:30
|
assume i have 2 tables table1(id,name,description,tid) table2(id(autoincrement),value)update table1 set tid= insert into table2 values('x') SELECT @@IDENTITY AS idthe above command is giving me an error.Can you suggest a solution?? |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-10-29 : 16:02:10
|
What is your goal? Not quite clear from the statement that you have. Are you trying to insert something into table2, get the value that got inserted into the id column and update the tid column in table1 with that value? If that is the case, which row in table1 do you want to update? |
|
|
|
|
|