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 |
|
Pete_N
Posting Yak Master
181 Posts |
Posted - 2011-01-26 : 07:05:48
|
| I have 2 tables containing client numbers, some of the client numbers appear in both tables. I for the life of me can not remmeber how to retun a query that gives me the client numbers from both tables. both ClientNumber fields are varchar fieldsieTable 1A100000B100000C100000Table 2B100000B100001ResultA100000B100000B100001C100000 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-01-26 : 07:15:20
|
For example using 2 selects with UNION No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
namman
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-01-27 : 21:24:36
|
| select * from table1intersectselect * from table2 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-01-28 : 01:47:38
|
quote: Originally posted by namman select * from table1intersectselect * from table2
You need to use UNIONMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|