Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table "Contact" which I created in Transformation layer, include data fields "Company_ID", "Company_Name", "Country_ID", "Country_Name". Some records start with character "Work" in this table don't have "Country_ID" and "Country_Name" originally. Here the example I attached only for presenting.
Company_ID | Company_Name | Country_ID | Country |
10001 | WorkShop | ||
10002 | CompanyB | 10 | France |
10003 | CompanyC | 20 | Italy |
10004 | CompanyD | 30 | China |
10005 | CompanyE | 40 | Japan |
10006 | WorkStation |
However, I want to give a "Country_ID" -- ("50") and a "Country_Name" -- ("Gemany") value to these records start with character "Work". Therefore, I added the code as below, but it doesn't work.
Load
Company_ID,
Company_Name,
if (WildMatch(Company_Name,'Work*')=1, Country_ID ='50',Country_ID) as Country_ID,
if (WildMatch(Company_Name,'Work*')=1, Country ='Germany',Country) as Country
From ...
I also tried to use the code below, but it doesn't work as well.
if (Company_Name = 'Work*,Country ='Germany',Country) as Country
Can you please take a look my case and let me know what I can do here to get the ideal result?
Thanks so much,
Becky
glad it worked