Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqfqlik
Creator
Creator

joining tables issue

Need help with the joining tables issue  as below:

Issue is that  the date values are being shown on separate rows

I tried to  use    len(trim(Concat(distinct child2_solddate)))  , but this is not working 

 

Table1:

parentIDchildIDchild1_Startdatesta
p1t15-Nov-181
p1t26-Nov-181
p1t37-Nov-181
p4t48-Nov-181
p5t59-Nov-181
p5t610-Nov-181
p7t711-Nov-181
p8t812-Nov-181

 

Table2:

parentIDchildIDchild2_Enddate1child2_filldatechild2_solddatesta
p1t910-Oct-1820-Sep-1825-Oct-184
p2t1011-Oct-1821-Sep-1826-Oct-184
p3t1112-Oct-1822-Sep-1827-Oct-184
p4t1213-Oct-1823-Sep-1828-Oct-184
p5t1314-Oct-1824-Sep-1829-Oct-184
p6t1415-Oct-1825-Sep-1830-Oct-184
p7t1516-Oct-1826-Sep-1831-Oct-184
p8t1617-Oct-1827-Sep-181-Nov-184

 

Required result:

parentchildstachild1_Startdatechild2_Enddate1child2_filldatechild2_solddate
p1t115-Nov-1810-Oct-1820-Sep-1825-Oct-18
p1t216-Nov-1810-Oct-1820-Sep-1825-Oct-18
p1t317-Nov-1810-Oct-1820-Sep-1825-Oct-18
p4t418-Nov-1813-Oct-1823-Sep-1828-Oct-18
p5t519-Nov-1814-Oct-1824-Sep-1829-Oct-18
p5t6110-Nov-1814-Oct-1824-Sep-1829-Oct-18
p7t7111-Nov-1816-Oct-1826-Sep-1831-Oct-18
p8t8112-Nov-1817-Oct-1827-Sep-181-Nov-18
Labels (1)
2 Replies
Gysbert_Wassenaar

You need to load only parentID, child2_Enddate1, child2_filldate and child2_solddate from table2:

MyTable:
LOAD * FROM Table1;

LEFT JOIN (MyTable)

LOAD parentID, child2_Enddate1, child2_filldate, child2_solddate FROM Table2;

That way only the parentID field will be used to join the records.

 


talk is cheap, supply exceeds demand
muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

Final_Table:

Load PatrentID as parent, ChildID as Child, child1_Startdate, sta from Table1;

left join(Final_Table)

load ParentID as Parent, child2_Enddate1, child2_filldate, child2_solddate from table2;

 

Muthukumar Pandiyan