Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table with items and dates it looks like that:
Item no. | Date (dd.MM.yyyy) |
---|---|
1111 | 01.01.2014 |
1111 | 03.05.2014 |
1111 | 02.07.2014 |
2222 | 04.02.2013 |
2222 | 09.05.2014 |
2222 | 01.07.2014 |
I wish to add a flag to indicate the max date for each item
appreciate any help
thanks
avner
The script which Alexandros17 posted is right.
But for your better understanding, it will be much better if u use the below
AAA:
LOAD Item,
myDate,
Item&Num(Date) as Key
FROM myTable;
left join (AAA)
LOAD Item&Num(MaxDate) as Key, 1 as Flag;
Load Item,
Max(myDate) as MaxDate
resident AAA
group by Item;
Drop Field Key;
Thanks,
Where in the script or in a chart?
In the script do:
AAA:
Select Item, myDate from myTable;
left join
Load Item, Max(myDate) as myFlag resident AAA group by Item;
Let me know
The script which Alexandros17 posted is right.
But for your better understanding, it will be much better if u use the below
AAA:
LOAD Item,
myDate,
Item&Num(Date) as Key
FROM myTable;
left join (AAA)
LOAD Item&Num(MaxDate) as Key, 1 as Flag;
Load Item,
Max(myDate) as MaxDate
resident AAA
group by Item;
Drop Field Key;
Thanks,
Hi Anver,
PFA Hope it will help you.
-- Regards,
Vishal Waghole
Thanks
it really helped me