Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
in my table there are two columns: NDG and ACCOUNT_NR
maybe
NDG ACCOUNT_NR
1 23
1 23
1 56
2 78
2 79
2 65
I want my load statement result like
NDG ACCOUNT_NR POS
1 23 1
1 56 2
2 78 1
2 79 2
2 65 3
where POS=current pos of distinct (NDG, ACCOUNT_NR) .
How can I write my load statement?
Thanks!
Hi, with previous() and peek() functions, I 've made this
at least i have 100% of match with your result
See the attachment
Rgds
Load Count(NDG&'-'&ACCOUNT_NR) AS COUNT_id
FROM .............