Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to assign row count with time based we need to assign row count like my out put way , Here my maximum time is 8/2/2015 so that is max count.
ID | Action | Creation_Date |
123 - NA | Positive | 8/1/2015 |
123 - NA | Negative | 8/2/2015 |
I am expecting Out put like below way :
ID | Action | Creation_Date | Row |
123 - NA | Positive | 8/1/2015 | 1 |
123 - NA | Negative | 8/2/2015 | 2 |
Regards,
Srinivas
T1:
Load ID, Action, Creation_Date From TableName;
NoConcatenate
T2:
Load
*,
AutoNumber(ID&Creation_Date,ID) as Row
Resident T1
Order By ID, Creation_Date;
Drop Table T1;
T1:
Load ID, Action, Creation_Date From TableName;
NoConcatenate
T2:
Load
*,
AutoNumber(ID&Creation_Date,ID) as Row
Resident T1
Order By ID, Creation_Date;
Drop Table T1;
load * ,
AutoNumber(Creation_Date,ID) as Row
From Table
Use ROW no function with order by.
RecNo() as Rec
or
RowNo() as Row
Hi Srinivas
you can try "Rowno()" function.
Hi, M srinivas.
Try.
tempTable1:
LOAD
ID,
Action,
Creation_Date
From TableName;
NoConcatenate
Table1:
LOAD
ID,
Action,
Creation_Date,
RowNo() as Row
Resident tempTable1
order by Creation_Date // By default is asc.
Drop table tempTable1;
Hope this helps!
Hi,
one solution could be also:
hope this helps
regards
Marco