Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Joe
2012-04-12 03:37:48

Hi

Use tmap to handle your left join,and it can get the all the join result as you wish.just by different settings.


Joe

larryawilson
2012-04-11 21:16:53

As a further example, this is the results I want:

Table1:
2009125                    Lansing
2010006                    Detroit

Table2:
2009125                     1               Design
2009125                     2               Construction

Results:
2009125                      1              Lansing                Design
2009125                      2              Lansing                Construction
2010006                                      Detroit

larryawilson
2012-04-11 20:28:39

I am trying to perform a join between two tables from different sources.  The primary key columns from the tables are as follows:

Table1: appl_num                (3625 rows)
Table2: appl_num, sect_id    (1387 rows)

So, Table1 is my master table.  Table2 contains details for a subset of the records in Table1.  However, a few of the records in Table1 (7 records) have multiple records (i.e. sect_id) in Table2. What I want to be able to do is to do a join on the table such that I would actually return 3632 records.  It would have to be an outer join such that every record in Table1 would be returned and also the multiple occurrences of the sect_id values from Table2. 

I have tried using tJoin, but that only uses Table2 as a lookup.  So, I only get the 3625 rows returned.  I do not get multiple rows returned for those appl_num values that have multiple sect_id values.  Logically speaking, what I am trying to do is the following SQL statement:

SELECT *
   FROM Table1 OUTER LEFT JOIN Table2 ON Table1.appl_num = Table2.appl_num;

How do I physically implement this in Talend, given the two tables are from different data sources?

Thanks,
Larry

Board footer

Powered by FluxBB