K
kc-mass
I have a large data feed that comes in and is mixed from two sources. One
part concerns transactions in NAmerica, the other the rest of the world
(reflects accounting department splits).
The NA data carries its country names in [NACountry]. The IntCountry
carries its country names
in [IntCountry].
What I need to do first is blend this data with a preference for
[NACountry]. That is first take [NACountry] if it is not null and otherwise
use [IntCountry] in the next process. This is pretty simple to do in the
basic query. Something like :
"SELECT IIf(IsNull([NACountry]),[INTCountry],[NACountry]) AS Country
FROM tblMonthTransactions;"
or
Just to get the data in another wise larger query set a transaction to:
Country: IIf(IsNull([NACountry]),[INTCountry],[NACountry])
I next, though preferably in the same query, want to compare the above
result to records in an ISO Country Code table to convert all country names
(France) to a two character code (FR).
My thought was to surround the above statement with a DLookUp statement. I
very seldom used DLookups and am floundering. The field Value to look for
is "A2". The table to look in is "tblISOCountries". The WHERE clause if
you will is "tblISOCountries!CountryName = Country" with
"Country"determined from above.
Any help on the syntax or noting that I am and why I am a fool will help.
Thx
Kevin
part concerns transactions in NAmerica, the other the rest of the world
(reflects accounting department splits).
The NA data carries its country names in [NACountry]. The IntCountry
carries its country names
in [IntCountry].
What I need to do first is blend this data with a preference for
[NACountry]. That is first take [NACountry] if it is not null and otherwise
use [IntCountry] in the next process. This is pretty simple to do in the
basic query. Something like :
"SELECT IIf(IsNull([NACountry]),[INTCountry],[NACountry]) AS Country
FROM tblMonthTransactions;"
or
Just to get the data in another wise larger query set a transaction to:
Country: IIf(IsNull([NACountry]),[INTCountry],[NACountry])
I next, though preferably in the same query, want to compare the above
result to records in an ISO Country Code table to convert all country names
(France) to a two character code (FR).
My thought was to surround the above statement with a DLookUp statement. I
very seldom used DLookups and am floundering. The field Value to look for
is "A2". The table to look in is "tblISOCountries". The WHERE clause if
you will is "tblISOCountries!CountryName = Country" with
"Country"determined from above.
Any help on the syntax or noting that I am and why I am a fool will help.
Thx
Kevin