Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
i wants to join attched two table in given excel sheet , payment_mile_stone_hdr shet hase unique HEADER_ID column and second table have this column but values are repeting , my requirement is only i need to be join these table against HEADER_ID.. plz suggest what query i should put for this .
Just load the two tables, using two separate Load statements. Since the key is named the same in both tables, it will link automatically and work as it is. No Join needed.
HIC
LOAD HEADER_ID,
payment_mile_stone_hdr_APPROVAL_STATUS,
PROJECT_ID,
TOWER_ID
FROM [hader sheet.xlsx] (ooxml, embedded labels, table is payment_mile_stone_hdr);
LOAD DESCRIPTION,
DUE_DATE,
HEADER_ID,
milestone_nam,
MS_DTL_ID
FROM [hader sheet.xlsx] (ooxml, embedded labels, table is payment_mile_stone_det);
Hi,
With a Left Join you will have repeated records.
Which fields you want to join and which values you want to choose if you want just one record for each HEADER_ID?
i want all the record from both table against header_id
thanks Henric for rply . i want single table only from both table record agaist header_id
LOAD ... FROM ...; // Load data from first sheet
OUTER JOIN
LOAD ... FROM ...; // Load data from second sheet and join everything
Note that you may end up with rows that have only half of their fields filled.
Peter
But why do you want to join the tables? If you use my script (without a join) you can still create exactly what you want in a chart object in the UI. Any calculation can be made, also without the join.
You don't need to join the tables in the script - and you shouldn't - unless you need to transform the resulting table further in the script. If so, you should do what pcammaert suggests below.
HIC