Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have the following key
Memo |
---|
123 |
124 |
125 |
123 |
I want a flag depending on the occurrence of the record in the field
Memo | Flag |
---|---|
123 | 1 |
124 | 1 |
125 | 1 |
123 | 2 |
if memo 123 repeats again 3 should come and so on. Finally I want to concatenate Memo and Flag.
Memo Key |
---|
1231 |
1241 |
1251 |
1232 |
Thanks!
try like:
Load
Memo,
AutoNumber(RecNo(), Memo) as Flag,
Memo & AutoNumber(RecNo(), Memo) as MemoKey
From <>;
try like:
Load
Memo,
AutoNumber(RecNo(), Memo) as Flag,
Memo & AutoNumber(RecNo(), Memo) as MemoKey
From <>;
It is working just fine.
Thanks for the fast reply!
another solution
Data:
LOAD Memo
FROM Table;
Final:
noconcatenate
LOAD Memo,
if(Memo=previous(Memo),peek('Flag')+1,1) as Flag
Memo & if(Memo=previous(Memo),peek('Flag')+1,1) as MemoKey
Resident Data
order by Memo;
drop table Data;
This solution is also working.
Thanks for the response!