Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pls clarify my doubt about tables joining

Hi,

      I have a parent table and two different child tables, i want to merge two child tables with parent table.

For example

Table 1 (Parent)                                            Table 2 (Child 1)                                            Table 3 (Child 2)

ParentID,  Invoice_No,   date         Parentid, Child1id,  Product,    Qty,  Rate,      parentid, Child2id Shipment_Date,  Dispatch_Date,

Ship 1      Inv 1         25/05/2014     Ship 1   1234,     xxxxxxx,      50    400         Ship 1,    4321        30/05/2014       28/05/2014    

I done left join parent table  with child 1 table, Similarly  child 2 table.  I got link Parent &child 1 , Parent &child 2  these two tables i have done concatenate so i got single table.

If i call fields from child 1 & child 2 in straight table then its come in two rows mentioned below

Invoice_No      Date          Product        qty  Rate          Shipment_date  Dispatch_Date

Inv 1            25/05/2014    xxxxxxx,      50    400                   -                      -

  -                    -                   -               -       -               30/05/2014       28/05/2014

desired output

it should be come

Invoice_No      Date          Product        qty  Rate          Shipment_date  Dispatch_Date

Inv 1            25/05/2014    xxxxxxx,      50    400         30/05/2014       28/05/2014

Regards

Vignesh

in App Development Reply

3 Replies
Anonymous
Not applicable
Author

It seems the ParentID was not spelled properly.

Can you send me a sample app?

Gysbert_Wassenaar

Instead of concatenating you can join all the tables:

Result:

load * from table1;

left join load * from table2;

left join load * from table3;


talk is cheap, supply exceeds demand
Not applicable
Author

Pls look attached file

Regards

Vignesh

On Fri, May 30, 2014 at 3:35 PM, Jebamalai Dass <qcwebmaster@qlik.com>