Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
separerl
Contributor III
Contributor III

How to get multiple values into one column ?

Hi !

I have a "design" question.

Lets say I have 2 tables of data

Table1:

OrderNoOrderdatePartNo's
123452017-02-10

Table2:

OrdernoPartNo
1234577
1234588
1234599

Wanted Result:

OrderNoOrderDatePartNo's
123452017-02-1077,88,99

How to fix this , any ideas ??

Regards Pär

1 Solution

Accepted Solutions
sunny_talwar

Here is a sample script and app attached

Table1:

LOAD * INLINE [

    OrderNo, Orderdate

    12345, 2017-02-10

];

Left Join (Table1)

LOAD OrderNo,

  Concat(PartNo, ', ') as PartNos

Group By OrderNo;

LOAD * INLINE [

    OrderNo, PartNo

    12345, 77

    12345, 88

    12345, 99

];

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

May be this:

Table1:

LOAD OrderNo,

          Orderdate

FROM Table1;

Left Join (Table1)

LOAD OrderNo,

          Concat(PartNo, ', ') as PartNos

FROM Table2

Group By OrderNo;

sunny_talwar

Here is a sample script and app attached

Table1:

LOAD * INLINE [

    OrderNo, Orderdate

    12345, 2017-02-10

];

Left Join (Table1)

LOAD OrderNo,

  Concat(PartNo, ', ') as PartNos

Group By OrderNo;

LOAD * INLINE [

    OrderNo, PartNo

    12345, 77

    12345, 88

    12345, 99

];

Capture.PNG

separerl
Contributor III
Contributor III
Author

Thanks Sunny !!

I tried your first answer and it works exactly as I wanted it to

I haven't written question into this forum for a couple of years , and now , when I did , I get the correct answer in just a couple of minutes.... OMG ...

Thanks again !

/Pär