Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Need help transferring this logic into an IF statement.
IF Fieldname = '1111' or '1112' or '1113' or '11233','ID' AS CODENAME
Write like
IF(Match(Fieldname,'1111','1112','1113','11233'),'ID') AS CODENAME
Small correction: You probably want ID to be a field reference. Then you cannot use single quotes. You need double quotes, or square brackets:
IF(Match(Fieldname,'1111','1112','1113','11233'),"ID") AS CODENAME
HIC
Thanks HIC but if ID is as string then it will use like 'ID' or if it is field reference then it will use like
1. If ID is field reference from table then
IF(Match(Fieldname,'1111','1112','1113','11233'),"ID") AS CODENAME
Or
IF(Match(Fieldname,'1111','1112','1113','11233'),[ID]) AS CODENAME
2.If ID is string then it will use like
IF(Match(Fieldname,'1111','1112','1113','11233'),'ID') AS CODENAME
Your r near to the code wht u want some correction check this one
TableA:
LOAD *,if(ID='5'or ID='4',ID) as ID1;
LOAD * Inline [
ID,Amount
1,10
2,20
3,30
4,40
5,50
];