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 |
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2007-06-05 : 12:00:30
|
| I have about 30 tabs with same struture.I want to simple put column 2 in all 30 table in a new table without joining on anything. Is there a way to do that?ThanksJP |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2007-06-05 : 12:02:06
|
| "I have about 30 tabs with same struture"Then you need to redisign your database."I want to simple put column 2 in all 30 table in a new table without joining on anything."Nope. Not happening without a join. Try following the links in my sig for more in depth help.[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-06-05 : 12:18:38
|
| Sounds like you don't want a JOIN, but a UNION... Also, it sounds like you probably have a really bad design.example:select colfrom table1union allselect colfrom table2union allselect colfrom table3....union allselect colfrom tableN- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2007-06-05 : 12:21:55
|
It sounded to me like he wants to try and normalize his tables. Either way, still sounded like a horrific design. Kind of like the dbs i use here at work [Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|