benedictine191
Registered User.
- Local time
- Yesterday, 16:15
- Joined
- Dec 1, 2015
- Messages
- 12
[SOLVED]Combine 2 queries in Access
Hi, im newbie to access, my name is Ben,
currently i have two syntax queries
the result currently is like this
see attachment pic 5
but what i want is like this
see attachment pic 3
the output what i want is, i compare fota date and survey date, which is smaller, i used it, but if any of them is null, i used the filled one.
thank you
Ben
Hi, im newbie to access, my name is Ben,
currently i have two syntax queries
Code:
SELECT [Raw Dealer].CHANNEL, [Raw Dealer].MD, [Raw Dealer].DEALER, [Raw Dealer].MATERIAL, [Raw Dealer].IMEI, [Raw Dealer].[SOLD TO], [Export MCS].MODEL_CD, [Export MCS].SURVEY_DATE, [Export MCS].FOTA_DATE,
iif([export mcs].survey_date<=[export mcs].fota_date,[export mcs].survey_date,[export mcs].fota_date) as MIN,
iif(isnull([export mcs].survey_date),[export mcs].fota_date,[export mcs].survey_date) as null
FROM [Export MCS] INNER JOIN [Raw Dealer] ON [Export MCS].IMEI = [Raw Dealer].IMEI;
the result currently is like this
see attachment pic 5
but what i want is like this
see attachment pic 3
the output what i want is, i compare fota date and survey date, which is smaller, i used it, but if any of them is null, i used the filled one.
thank you
Ben
Attachments
Last edited: