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 |
|
dr223
Constraint Violating Yak Guru
444 Posts |
Posted - 2012-08-31 : 10:36:52
|
| Hi, I have 3 tables with data; Table 1Fruit Quantity PriceBanana 20 £2Apple 18 £1Mango 15 £1Table 2Fruit Quantity PricePears 22 £2Peeches 11 £1Oranges 9 £1Table 3Fruit Quantity PriceGrapes 22 £2cucumber 11 £1I want my query to join all these tables so that I can have; Output Results:Fruit Quantity PriceBanana 20 £2Apple 18 £1Mango 15 £1Pears 22 £2Peeches 11 £1Oranges 9 £1Grapes 22 £2cucumber 11 £1Many thanks |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-08-31 : 10:59:48
|
| select * from Table1union allselect * from Table2union allselect * from Table3==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
dr223
Constraint Violating Yak Guru
444 Posts |
Posted - 2012-08-31 : 11:14:10
|
| Thank you |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-31 : 11:17:11
|
| can same fruit exists in multiple tables with different quantity? if thats case how should output be?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|