Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have one column in which i am arranging data in a descending order. I want to give a unique row number for each row like 1,2,3,4...
but suppose the data is same in two rows lets say value is 30 and again 30 in the second row it should give same number to both the rows like 1,1 or 2,2
What would be the best function to use and what would be the expression. Is it Rank function that should be userd?
Please refer to the attached file ,
This resolves your question.
s_no in the sample is your output field.
Regards
Nitin
You could add a counter field in the script and use that:
Load MyField, autonumber(MyField) as Counter
From ...
You could also try using the fieldindex function as an expression: fieldindex('MyField', MyField)
Please refer to the attached file ,
This resolves your question.
s_no in the sample is your output field.
Regards
Nitin
Hi Rohan,
Use RowNo() in load script this will give 1,2,3,4,5 etc.
Example:
Data:
LOAD
*,
RowNo() AS UniqueNumber
FROM DataSource;
Regards,
Jagan.
If the values are not in sorted order then what will be the procedure.
Hi rohan,
Dev03:
LOAD * Inline
[
Fild,Value
A,1
B,2
C,3
D,3
E,4
F,5
G,5
H,6
I,7
J,7
K,8
];
LOAD RowNo() AS UID,* Resident Dev03;