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 |
krista80
Starting Member
29 Posts |
Posted - 2011-02-24 : 14:43:55
|
I have a select statement that looks like this:INSERT INTO table3 (ACC)(SELECT FAC FROM table4WHEREtable2.Temp_Serv = table4.Serv)Any help is greatly appreciated. |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-02-24 : 14:52:16
|
INSERT INTO table3 (ACC)SELECT FAC FROM table4INNER JOIN table2 ON table2.Temp_Serv = table4.Serv |
 |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-02-24 : 14:53:41
|
You'll probably need to join table3, table2 and table4. To start , all of those tables should appear in the FROM clause using JOINs.JimEveryday I learn something that somebody else already knew |
 |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-02-24 : 14:55:16
|
Oops, thought it was update and not insert for some reason!Never mind,JimEveryday I learn something that somebody else already knew |
 |
|
krista80
Starting Member
29 Posts |
Posted - 2011-02-25 : 08:13:36
|
Thanks everyone! It worked! |
 |
|
|
|
|