Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a new fileds using and in if statement. But i'm not getting any result.
But a simple if statement is not working. I know there should be something wrong in my syntax.
Can someone please help?
Table1:
LOAD * Inline
[
ID, Name
1,A
1,B
1,C
1,D
1,E
];
Table2:
LOAD *,
If(Name='A' and Name='B' and Name='D' and Name='D' and Name='E' , 'special') as test
Resident Table1;
DROP Table Table1;
Hi,
I guess you're looking for a category based on the actual name sequence, so one solution to this problem might be:
mapCategory:
Mapping LOAD * Inline [
NameSequence, Category
ABCDE, normal
ABDDE, special
EDCBA, reverse
];
Table1:
LOAD * Inline
[
ID, Name
1,A
1,B
1,C
1,D
1,E
2,A
2,B
2,D
2,D
2,E
3,E
3,D
3,C
3,B
3,A
];
Join
LOAD ID,
ApplyMap('mapCategory',Concat(Name,'',RecNo())) as Category
Resident Table1
Group By ID;
hope this helps
regards
Marco