Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I just created a new field in one of my tables as a result of an ApplyMap():
ApplyMap('Company_Country', IdCompany) as IdCountry which works OK. As a result, I get a new column in my table named IdCountry which keeps the country of the company.
When I try to use that new field in an ApplyMap() (for instance to get the continent), an error shows up claiming IdCountry is not found:
ApplyMap('Company_Continent',IdCountry ) as IdContinent,
ApplyMap('Company_Continent_Name',IdCountry) as ContinentName,
One workaround could be the following:
ApplyMap('Company_Continent', ApplyMap('Company_Country', IdCompany)) as IdContinent,
ApplyMap('Company_Continent_Name', ApplyMap('Company_Country', IdCompany)) as ContinentName,
What am I doing wrong?
Thanks for your help
Àlex
Are you doing this in the same load? or is this in a load statement (resident or precedent load) after idCountry has been created? The same load doesn't work, because the field is still getting created and you cannot refer to the field being created in the same load (at least not for this scenario).
Are you doing this in the same load? or is this in a load statement (resident or precedent load) after idCountry has been created? The same load doesn't work, because the field is still getting created and you cannot refer to the field being created in the same load (at least not for this scenario).
Thanks for your quick reply!
I'm doing this in the same table load, so I guess I should use a temporary table instead.
Regards,
àlex
You can use a temporary table or you can use Preceding LOAD
Thanks! I'm gonna try Preceding Load