Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to create a serial number in the load script , but i need to reset to this again 1 when there is a change in the code.
Suppose my table is like this
itemcode,supplier
in this load when itemcode change that time need to reset the serial number to 1.
Can anybody help.
Regards,
Ajith
Hi
This code should do it:
LOAD
...
itemcode,
supplier,
if(itemcode = previous(itemcode), peek('serialno') + 1, 1) as serialno,
...
HTH
Jonathan
Hi
This code should do it:
LOAD
...
itemcode,
supplier,
if(itemcode = previous(itemcode), peek('serialno') + 1, 1) as serialno,
...
HTH
Jonathan
Thank You.