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 |
easy_goer
Starting Member
21 Posts |
Posted - 2013-09-30 : 11:33:33
|
Hello.I have one table that looks something like this..3022224 G 4980 65 33022224 U 4980 596 23022224 G 4980 67 3And another that looks something like this..28077 1 302222428078 1 302222428079 1 3022224I need insert the following into another table based on the two tables above. The long number (3022224) is what I use to join the two original tables.28077 1 G 4980 65 328077 1 U 4980 596 228077 1 G 4980 67 328078 1 G 4980 65 328078 1 U 4980 596 228078 1 G 4980 67 328079 1 G 4980 65 328079 1 U 4980 596 228079 1 G 4980 67 3Any ideas would be much appreciated.Thank you,Keith |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2013-09-30 : 12:03:34
|
insert into SomeTableselect t1.Column1, t1.Column2, t1.Column3, t1.Column4, t1.Column5, t2.ColumnA, t2.ColumnBfrom t1join t2 on t1.Column1 = t2.Column1Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|