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 |
|
kaff
Starting Member
11 Posts |
Posted - 2006-01-19 : 01:53:46
|
| Hi,I have two identical tables in two differant databases.I need to get the unioun of those tables.Only on One column.LikeDatabase1.Table1.Col1 union database2.Table1.col1Any help?Thanks in AdvanceKaff |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-01-19 : 01:55:13
|
| [code]select Col1 from Database1.Table1union allselect Col1 from Database2.Table1[/code]-----------------'KH' |
 |
|
|
kaff
Starting Member
11 Posts |
Posted - 2006-01-19 : 02:20:38
|
| Thanks KH..Can we have Order by clause on that column?Kaff |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-01-19 : 02:27:59
|
yes. you canselect Col1 from Database1.Table1union allselect Col1 from Database2.Table1order by Col1 -----------------'KH' |
 |
|
|
|
|
|