Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI ,
I have 2 fields 1 is id, value
those 2 fields are having values are like below
ID, Value
1, a/b/c/d
BUt i want o/p like below
ID, value
1,a
2,b
3,c
4,d
How i can get the value?
Thanks in advance.
are you guys from the same team??
the same query has been posted here
Hi,
Try this.
Data:
Load * inline [
ID, Value
1, a/b/c/d
];
Temp:
Load ID as ID1 , SubField(Value,'/') as Value Resident Data;
Drop table Data;
Final:
Load If(isnull(Previous(ID1)),ID1,(Peek(ID)+1)) as ID, Value Resident Temp;
Drop table Temp;
Regards,
Kaushik Solanki
Another options
Table:
LOAD RowNo() as ID,
SubField(Value, '/') as Value;
Load * inline [
ID, Value
1, a/b/c/d
];
It could very well be an interview question
Lol
I am serious... I have seen people posting there interview question on the community....
And question has been asked third time today, I think everyone is appearing for the same job
So if it is the third time... I am 99% sure it is for one of the interview.... But I guess if everyone answers it in the same way... it kind of defeats the purpose... How do you you choose? lol