Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! I am hoping someone can help me on this...
I have a script below which I want to number by OrderNo...but it's not what I expected ... I'd like to have an output based on the table as below highlighted in yellow.
Order:
load*,
autonumberhash128([OrderNo) as Sequence
Resident Order
order by [OrderNo];
Drop table Order;
Thank you in advance...
Hi: Sunny,
It worked... I just need to take out the ' ' in Peek('DesiredOutput') and make as Peek([Desired Output]) ...
Thank you much...
Try this
Table:
LOAD * INLINE [
OrderNo
A682
A904
A913
A913
B576
B577
B578
B578
B578
C588
D589
E137
];
FinalTable:
LOAD RowNo() as RowNum,
*,
If(OrderNo = Previous(OrderNo), Peek('DesiredOutput'), RecNo()) as DesiredOutput
Resident Table
Order By OrderNo;
DROP Table Table;
Hi: Sunny,
It worked... I just need to take out the ' ' in Peek('DesiredOutput') and make as Peek([Desired Output]) ...
Thank you much...
peek() works with single quotes!
HI! It reloads successfully but there are missing numbers with the single quotes.
That is because you named your column as Desired Output with a space.... mine was without space
FinalTable:
LOAD RowNo() as RowNum,
*,
If(OrderNo = Previous(OrderNo), Peek('DesiredOutput'), RecNo()) as DesiredOutput
Resident Table
Order By OrderNo;
DROP Table Table;
Anyways, I encourage you to open the attached file to check out the app to see that it was actually working in there
I actually did open it and that's when I realized it must have something to do with the space....
Great.... I am glad it helped you...