Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I want to write an if condition as below:
For e.g
Fieldname
1
2
3
4
5
if(Fieldname = '1','A',
if(Fieldname <> '1','B',
if(Fieldname = 'ALL','C',
)
ALL is whole value in the field.
Please help me with this issue...
Regards,
Kavita
May be create a link table:
LinkTable:
LOAD DISTINCT FieldName,
'A' as Flag
Resident Fact
Where Fieldname = 1;
Concatenate (LinkTable)
LOAD DISTINCT FieldName,
'B' as Flag
Resident Fact
Where Fieldname <> 1;
Concatenate (LinkTable)
LOAD DISTINCT FieldName,
'C' as Flag
Resident Fact;
May be create a link table:
LinkTable:
LOAD DISTINCT FieldName,
'A' as Flag
Resident Fact
Where Fieldname = 1;
Concatenate (LinkTable)
LOAD DISTINCT FieldName,
'B' as Flag
Resident Fact
Where Fieldname <> 1;
Concatenate (LinkTable)
LOAD DISTINCT FieldName,
'C' as Flag
Resident Fact;
Thanks...
But I don't want to do concatenation..is there any simple solution..like in if condition itself..?
AFAIK, if won't be able to handle it. Why are you hesitant to use concatenation here? your data model should not be impacted too much because you won't expand your Fact table, it will only be a link table.
Okay..i tried...Thanks for the solution..