Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hbuchetmann
Contributor III
Contributor III

Add Order Position to a table in the LOAD skript depending on orderid

Hello together,

 

i am looking for a solution to the following problem.

I have a table which i load via skript:

OrderIdArtikelNROrderItemQuantity
381180001001
381123540032
381123540114
381123540091
381123540142
381123544742
381123540102
381123540002
381123540124
3812622175010
381280001001
381580001001
381512319865

 

Now i need to add an Order Position (Field OrderPos) through the skript LOAD statement  depending on the OrderID, always counting up by 1 starting from 1.

 

This should be the result:

OrderIdOrderPosArtikelNROrderItemQuantity
3811180001001
3811223540032
3811323540114
3811423540091
3811523540142
3811623544742
3811723540102
3811823540002
3811923540124
38121622175010
3812280001001
3815180001001
3815212319865

 

It sounds simple, but sadly i cannot come up with a solution myself.

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this?

Load OrderID, AutoNumber(Rowno(), OrderID) as OrderPos, ArtikelINR, OrderItemQuanity From Source;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

2 Replies
Anil_Babu_Samineni

Perhaps this?

Load OrderID, AutoNumber(Rowno(), OrderID) as OrderPos, ArtikelINR, OrderItemQuanity From Source;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hbuchetmann
Contributor III
Contributor III
Author

Hello Anil_Babu_Samineni,

that worked perfectly. Thanks you very much for your help!

Best wishes from Germany,

 

Hermann