Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Guys,
Pls help me in this logic pls..
I have three field
Field1 | Field2 | Field3 | Field4 |
1 | 1 | ||
2 | 20 | ||
3 | 31 | ||
4 | 41 | ||
5 | 53 | ||
6 | 6 | ||
7 | 7 | ||
8 | 84 | ||
9 | 96 | ||
10 | 10 |
I want output as
Final output
1
2
3
4
5
6
7
8
9
10
How i can achieve it? without concatenating four three times
Then perhaps:
If(Len(Trim(Field1)),Field1,If(Len(Trim(Field2)),Field2,Field3)) as Result
LOAD
alt(Field1,Field2,Field3) as Result
FROM
...somewhere
another way
Data:
LOAD Field1 as Field
FROM Table
Where len(trim(Field1))>0;
concatenate(Data)
LOAD Field2 as Field
FROM Table
Where len(trim(Field2))>0;
concatenate(Data)
LOAD Field3 as Field
FROM Table
Where len(trim(Field3))>0;
Sorry I didn't see the last line of your quesion
If i have text value in my field1,2,3,
will this work?
also try
LOAD trim(Field1&Field2&Field3) as Field
FROM Table
hi gysbert,
could you pls provide the sample file, its not working at my end
thanks for your support
No. The alt function only works with numbers. If you have text you can try what kush141087 posted above
Hi Kushal,
this will only concat the field , will not give desired output i want.
thanks for revert
Then perhaps:
If(Len(Trim(Field1)),Field1,If(Len(Trim(Field2)),Field2,Field3)) as Result
Can you show me what you are getting as output using that?