Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 prabhas277
		
			prabhas277
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 vinieme12
		
			vinieme12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		are you guys from the same team??
the same query has been posted here
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Another options
Table:
LOAD RowNo() as ID,
SubField(Value, '/') as Value;
Load * inline [
ID, Value
1, a/b/c/d
];
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It could very well be an interview question 
 
					
				
		
 vinieme12
		
			vinieme12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Lol
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am serious... I have seen people posting there interview question on the community.... 
 
					
				
		
 vinieme12
		
			vinieme12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		And question has been asked third time today, I think everyone is appearing for the same job 
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
