07-12-2011 02:27 PM
I have two datasets dataset a and dataset b.
i want to map product for each id in dataset a from dataset b
final dataset should look like this:
id value product
123 xyz def
456 wxy tss
I'm using left outer join on id....but not getting desired results.
how can i do this.
07-12-2011 02:34 PM
A standard left join should work.
create table want as
select a.id, a.value, b.product
from tablea a
left join tableb b
You can (should) post your code if something like the above isn't working for you.
07-12-2011 03:47 PM
Your right hand dataset must have duplicate records for the id variables. If they are exact duplicates then adding the DISTINCT keyword after the SELECT keyword will reduce the number of records.