Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
i have a field like this
instead of S and I i have to display store and individual ho can i do that? thanks.....
You can use like below also...No need for Mapping Load
ODBC CONNECT32 TO [MS Access Database;DBQ=E:\sample database\AdventureWorks.accdb];
Load CustomerID,
IF(CustomerType = 'S', 'Store',
IF(CustomerType = 'I', Individual)) as CustomerTypeFull;
SQL SELECT CustomerID,
CustomerType
FROM `Sales_Customer`;
This can be done in backend and front end
in backend
if(Customer='S','Store',if(Customer='I','Individual','Others') as NewFieldName
or you can do by applymap
in front end
if(Customer='S','Store',if(Customer='I','Individual','Others')
Hi arul.
Mr Prem is right. You can try this.
Customer is table name?
try this
in expression--
pick(match(CustomerTy,'S','I'),'store','indivisual')
**********************************************
in script
pick(match(CustomerTy,'S','I'),'store','indivisual') as Customer
This can be done in backend and front end
in backend
if(CustomerTy='S','Store',if(CustomerTy='I','Individual','Others') as NewFieldName
or you can do by applymap
in front end
if(CustomerTy='S','Store',if(CustomerTy='I','Individual','Others')
and try Vishwaranjan Kumar solution its a better approach...
You can use mapping load for that
like this
Type:
mapping LOAD * INLINE [
CustomerType,FullName
S,Store
I,Individual
];
Map CustomerType using Type;
LOAD * INLINE [
CustomerType
S
I
];
if(CustomerType='S','Store',if(CustomerType='I','Individual') as new;
hi it throw script error.. did i made any mistake?
You can use applymap() function which will work as lookup for you and it would be a good approach
Hi
it display like this in script it says error.. thanks...