clintthorn
Registered User.
- Local time
- Yesterday, 21:46
- Joined
- Jul 2, 2008
- Messages
- 16
I have 2 fields that are related (Distcode and Prevcode). All rows of data have distcode and prevcode values. However, so of the Prevcode values are 'UNK'. When this is the case, their value should actually equal the value in the distcode field.
I know in Excel this would be a simple 'IF' formula, but I do not know how to replicate this in Access.
Any tips?
Below is the Query's SQL:
SELECT Month([Date]) AS [Month], DLP_Data_Table.Date, DLP_Data_Table.Source, DLP_Data_Table.Client, DLP_Data_Table.Prodcode, DLP_Data_Table.Offercode, DLP_Data_Table.Lang, DLP_Data_Table.Distcode, DLP_Data_Table.Prevcode, DLP_Data_Table.Country, DLP_Data_Table.Presented, DLP_Data_Table.Accepted, DLP_Data_Table.Installed, Brandcode_Table.Product, Bucket_Table.DISTRIBUTION, Bucket_Table.BUCKETS, Bucket_Table.[RP Version], Geo_Table.Geo
FROM (Geo_Table RIGHT JOIN (DLP_Data_Table LEFT JOIN Bucket_Table ON DLP_Data_Table.Distcode=Bucket_Table.DISTCODE) ON Geo_Table.[2 digit]=DLP_Data_Table.Country) LEFT JOIN Brandcode_Table ON DLP_Data_Table.Offercode=Brandcode_Table.Offer;
I know in Excel this would be a simple 'IF' formula, but I do not know how to replicate this in Access.
Any tips?
Below is the Query's SQL:
SELECT Month([Date]) AS [Month], DLP_Data_Table.Date, DLP_Data_Table.Source, DLP_Data_Table.Client, DLP_Data_Table.Prodcode, DLP_Data_Table.Offercode, DLP_Data_Table.Lang, DLP_Data_Table.Distcode, DLP_Data_Table.Prevcode, DLP_Data_Table.Country, DLP_Data_Table.Presented, DLP_Data_Table.Accepted, DLP_Data_Table.Installed, Brandcode_Table.Product, Bucket_Table.DISTRIBUTION, Bucket_Table.BUCKETS, Bucket_Table.[RP Version], Geo_Table.Geo
FROM (Geo_Table RIGHT JOIN (DLP_Data_Table LEFT JOIN Bucket_Table ON DLP_Data_Table.Distcode=Bucket_Table.DISTCODE) ON Geo_Table.[2 digit]=DLP_Data_Table.Country) LEFT JOIN Brandcode_Table ON DLP_Data_Table.Offercode=Brandcode_Table.Offer;