Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a table like below
EMPLOYEE NO | RelationType |
0T38 | Parents |
0T38 | Self |
0T46 | Parents |
0T46 | Self |
0T47 | Parents |
0T47 | Self |
0T47 | Spouse |
0T50 | Parents |
0T50 | Self |
0T50 | Spouse |
i want result like below
EmpNo | ReGroup |
0T38 | Parents+Self |
0T46 | Parents+Self |
0T47 | Parents+Self+Spouse |
is it possible pls help me
Maybe like
INPUT:
LOAD * INLINE [
EMPLOYEE NO, RelationType
0T38, Parents
0T38, Self
0T46, Parents
0T46, Self
0T47, Parents
0T47, Self
0T47, Spouse
0T50, Parents
0T50, Self
0T50, Spouse
];
Result:
LOAD [EMPLOYEE NO], Concat(RelationType, '+') as GroupRelation
Resident INPUT
GROUP BY [EMPLOYEE NO];
Thanks Stefan
One more help
i have data like below
PONO | Date |
2 | 2/2/2016 |
2 | 3/3/2016 |
3 | 3/3/2016 |
3 | 4/4/2016 |
4 | 1/1/2016 |
5 | 1/1/2016 |
5 | 5/5/2016 |
i want to get the result like
PONO | Date | Month |
2 | 2/2/2016 | Month1 |
2 | 3/3/2016 | Month2 |
3 | 3/3/2016 | Month1 |
3 | 4/4/2016 | Month2 |
4 | 1/1/2016 | Month1 |
5 | 1/1/2016 | Month1 |
5 | 5/5/2016 | Month2 |
pls help me
Maybe something like
INPUT:
LOAD * INLINE [
PONO, Date
2, 2/2/2016
2, 3/3/2016
3, 3/3/2016
3, 4/4/2016
4, 1/1/2016
5, 1/1/2016
5, 5/5/2016
];
Result:
LOAD PONO,
Date,
'Month'&AutoNumber(MonthName(Date),PONO) as Month
RESIDENT INPUT
ORDER BY PONO, Date;
DROP TABLE INPUT;