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 |
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2005-12-25 : 13:21:16
|
can someone help me with teh sql to join to tablesboth have fields calledfirstnamelastnamecitystatecountrytelemail |
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2005-12-25 : 22:55:10
|
Are you looking for the cummulative result of both the tables or the matching records from the tables? |
 |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2005-12-26 : 00:52:51
|
i just want to show all the results joined as one query so I can see all from both tables |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-26 : 00:57:54
|
Are you looking for something like this?Select T1.*, T2.* from Table1 T1 inner join Table2 T2 on T1.firstname=T2.firstnameMadhivananFailing to plan is Planning to fail |
 |
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2005-12-26 : 01:01:51
|
select firstname,lastname,city,state,country,tel,emailfrom table1unionselect firstname,lastname,city,state,country,tel,emailfrom table2Query will display all the records from both the tables as one table.(but will not show the matching records. use union all to see even the duplicate records) |
 |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2005-12-26 : 01:46:56
|
thanks - union was what i was looking for -- i just couldn't remember! :) |
 |
|
|
|
|
|
|