Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
agnie_john
Partner - Contributor II
Partner - Contributor II

Check Duplicate values in Column

Hi,

I have  a table with duplicate values in on column.

I need to do some logic for duplicate records.

this is my table

 

ItemQtyCost
Item11100
Item11101
Item11100
item21200
item32

300

This the Output i need. 

ItemQtyCostDuplicateRevised Qty
Item11100No1
Item11101Yes0
Item11100Yes0
item21200No1
item32300No2

How to do this using load script or set analysis?

Thanks,

John.

1 Reply
sasikanth
Master
Master

HI

Check this,

LOAD *, if(Item=Peek(Item) and Qty=Peek(Qty),0,Qty) as RevisedQty;

load * Inline [

Item Qty Cost

Item1 1 100

Item1 1 101

Item1 1 100

item2 1 200

item3 2 300

] (delimiter is \t);