Forum Discussion
Anonymous
10 years agoNot applicable
Using the "IF" function to create a new column
Hello, I need to create a new column and it must use the condition "IF", for example: = If (Provider = '05521463000112 - CAMARA MUNICIPAL TERESINA', 'Transfer to Camara' if (Provider = '4125...
Anonymous
10 years agoNot applicable
Sorry but I could not understand
Greg_Deckler
10 years agoCommunity Champion
Anonymous - Perhaps I'm not understanding your request, but basically, if you have a SQL table (or really ANY source) of "Lookup values" and "Replacement values" like:
Lookup,Replace
05521463000112 - CAMARA MUNICIPAL TERESINA,Transfer to Camara
41256744000159 -. IPMT- INST.PREV.DOS SERV MUN, Transfer to IPMT
Create a new blank query and paste in the following code provided and change MYSqlServer, MyDatabase, the table name and the column names to fit your data model. If you give me your source, column names and other information I can write you the exact function.
- Anonymous10 years agoNot applicable
thank you but I ended up solving this in my ETL process