Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
satheshreddy
Creator III
Creator III

Duplicate values

Hi All,

i have data like this AND  am getting output like the bellow and i need out put like last table.

please help me on this.

BBBBBBBB.PNG

Regards
Sathsih

1 Solution

Accepted Solutions
Kushal_Chawda

try this

Data:

LOAD * INLINE [

    A, B, C, D, E

    XYZ, 1, 110, AA, 1.2

    XYZ, 1, 110, AA, 3.8

    XYZ, 2, 210, AA, 9.2

    XYZ, 3, 310, AA, 23

];

Left Join(Data)

LOAD A,

     B,

     D,

     min(E) as E,

     1 as Flag

Resident Data

Group by A,

     B,

     D;

    

Left Join(Data)

LOAD Flag,

     B as B1,

     C as C1,

     D as D1,

     E as E1

Resident Data

where B=2;

Left Join(Data)

LOAD Flag,

     B as B2,

     C as C2,

     D as D2,

     E as E2

Resident Data

where B=3;

Final:

NoConcatenate

LOAD *

Resident Data

where not match(B,2,3);

DROP Table Data;

DROP Field Flag;

View solution in original post

8 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi,

Is it necessary in a script or in UI? And how did you get the table "GETTING Output"?

Regards,

Andrey

satheshreddy
Creator III
Creator III
Author

Hi  Andrey,

i have created based on b=2 columns using resident load and am comparing the data.

i need required  output

Regards

Sathsih

satheshreddy
Creator III
Creator III
Author

Hi Andrey,

its necessary in Script level why because we are using table box for showing data.

Regards

Sathsih

Kushal_Chawda

What is the logic get the output you are showing?

Kushal_Chawda

try this

Data:

LOAD * Inline [

A,B,C,D,E

XYZ,1,110,AAA,1.2

XYZ,1,110,AAA,3.8

XYZ,2,210,AAA,9.2 ];

Left Join(Data)

LOAD A,

     B,

     D,

     min(E) as E,

     1 as Flag

Resident Data

Group by A,

     B,

     D;

    

Left Join(Data)

LOAD Flag,

     B as B1,

     C as C1,

     D as D1,

     E as E1

Resident Data

where B=2;

Final:

NoConcatenate

LOAD *

Resident Data

where B<>2;

DROP Table Data;

DROP Field Flag;

Capture.JPG

satheshreddy
Creator III
Creator III
Author

Hi Kushal,

using actual data am filtrating based on B column and loading all columns  using resident load here am using qualify * and unqualify one column name and then in UI am showing data in Table Box.

FAF.

i need output like last one.

Regards

Sathish

Kushal_Chawda

try this

Data:

LOAD * INLINE [

    A, B, C, D, E

    XYZ, 1, 110, AA, 1.2

    XYZ, 1, 110, AA, 3.8

    XYZ, 2, 210, AA, 9.2

    XYZ, 3, 310, AA, 23

];

Left Join(Data)

LOAD A,

     B,

     D,

     min(E) as E,

     1 as Flag

Resident Data

Group by A,

     B,

     D;

    

Left Join(Data)

LOAD Flag,

     B as B1,

     C as C1,

     D as D1,

     E as E1

Resident Data

where B=2;

Left Join(Data)

LOAD Flag,

     B as B2,

     C as C2,

     D as D2,

     E as E2

Resident Data

where B=3;

Final:

NoConcatenate

LOAD *

Resident Data

where not match(B,2,3);

DROP Table Data;

DROP Field Flag;

ahaahaaha
Partner - Master
Partner - Master

May be like at attached file (to your data, I added one more line)?