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 |
|
u2p_inst
Yak Posting Veteran
78 Posts |
Posted - 2003-05-11 : 04:23:20
|
| I have 2 tables and each table have same name of field Is it possible to joining same field in different table, if possible How?table1: NameCode FullName f312 Adrianus Wtable2: NameCode FullName M610 Dyan Knowthe oytput needed is: NameCode | FullName f312 | Adrianus W M610 | Dyan Knowoh |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2003-05-11 : 05:02:28
|
| This doesn't look like a join. Looks like you want a union.select namecode, fullnamefrom table1unionselect namecode, fullnamefrom table2-Chadhttp://www.clrsoft.comSoftware built for the Common Language Runtime. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-05-12 : 12:58:54
|
| and...if you want to know what table the data came fromselect 'table1' as source, namecode, fullname from table1 union select 'table2' as source, namecode, fullname from table2 Brett8-) |
 |
|
|
|
|
|