| Author |
Topic |
|
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2009-09-25 : 05:50:01
|
| Hi,Im trying to retrieve all the records back from one table joining onto another, im using a where clause where table a is joining table b (with the clause) but id like all the records returned anyways.....table_a (id, product)table_b (product, downloadtype)select a.product, downloadtypefrom table_a as a left outer join table_b as b ona.product = b.productwhere b.downloadtype = 'demo'Thanks |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-09-25 : 06:06:58
|
| Hi, Try this onceselect a.product, downloadtype from table_a as a left outer join table_b as b on a.product = b.product and b.downloadtype = 'demo' |
 |
|
|
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2009-09-25 : 06:09:07
|
Hi,thanks for prompt reply, its almost but it gives me duplicates now, soproduct, platform, download1, 1, null1, 2, null <---- not needed1, 2, demodoes that make sense?quote: Originally posted by Nageswar9 Hi, Try this onceselect a.product, downloadtype from table_a as a left outer join table_b as b on a.product = b.product and b.downloadtype = 'demo'
|
 |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-09-25 : 06:15:20
|
quote: Originally posted by cipriani1984 Hi,thanks for prompt reply, its almost but it gives me duplicates now, soproduct, platform, download1, 1, null1, 2, null <---- not needed1, 2, demodoes that make sense?quote: Originally posted by Nageswar9 Hi, Try this onceselect a.product, downloadtype from table_a as a left outer join table_b as b on a.product = b.product and b.downloadtype = 'demo'
Hi,Can u post ur data in tables |
 |
|
|
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2009-09-25 : 06:34:38
|
Table_aid, product1, Mars2, BattleTable_bproduct, DownloadTypeMars, DemoBattle, FullIm hoping to get it to show1, Mars, Demo1, Mars, Nullquote: Originally posted by Nageswar9
quote: Originally posted by cipriani1984 Hi,thanks for prompt reply, its almost but it gives me duplicates now, soproduct, platform, download1, 1, null1, 2, null <---- not needed1, 2, demodoes that make sense?quote: Originally posted by Nageswar9 Hi, Try this onceselect a.product, downloadtype from table_a as a left outer join table_b as b on a.product = b.product and b.downloadtype = 'demo'
Hi,Can u post ur data in tables
|
 |
|
|
|
|
|