G
Guest
I presently have a DAO routine that creates recordsets so I can scroll
through and find different or missing values between the recordsets.
I felt I could have the most control with this setup.
However, after being recently exposed to some powerful SQL (see More help
with A Not so simple - MAX function - answer by Ofer)
I would much rather get rid of the code, and construct an SQL query.
I have a table called tbl_AIPProfileVariables
The fields are:
ProfileVariable
PF_Value
Base Environment
Base Env Date
Modified Environment
Mod Env Date
Though it is just one table, the comparison I will be doing is between
Environments of Different Env Date
For example: I would like to compare Environment "A" extracted on 12/15/2004
8:30 AM with Environment "A" extracted on 12/03/2004 3:30 PM
A comparison could also be one between A and B, but for the purposes of this
example, I want to illustrate that it could be between same name environments
with just different Env Dates
and I'd like the result to look something like this: (date has been
shortened for this example)
ProfileVariable PF_Value Status ChangedFrom Base Base Mod
Mod
Env Dt Env dt
========= ====== ==== ========= === === ==== ===
Send_PT 3 Different 2 A
12/15 A 12/3
Appt_Count Count all Missing - A
12/15 A 12/3
TimeOfDay Morning Different Evening A 12/15
A 12/3
I'm presently walking through the recordsets using DAO...
but I feel this could be handled more efficiently with SQL?
through and find different or missing values between the recordsets.
I felt I could have the most control with this setup.
However, after being recently exposed to some powerful SQL (see More help
with A Not so simple - MAX function - answer by Ofer)
I would much rather get rid of the code, and construct an SQL query.
I have a table called tbl_AIPProfileVariables
The fields are:
ProfileVariable
PF_Value
Base Environment
Base Env Date
Modified Environment
Mod Env Date
Though it is just one table, the comparison I will be doing is between
Environments of Different Env Date
For example: I would like to compare Environment "A" extracted on 12/15/2004
8:30 AM with Environment "A" extracted on 12/03/2004 3:30 PM
A comparison could also be one between A and B, but for the purposes of this
example, I want to illustrate that it could be between same name environments
with just different Env Dates
and I'd like the result to look something like this: (date has been
shortened for this example)
ProfileVariable PF_Value Status ChangedFrom Base Base Mod
Mod
Env Dt Env dt
========= ====== ==== ========= === === ==== ===
Send_PT 3 Different 2 A
12/15 A 12/3
Appt_Count Count all Missing - A
12/15 A 12/3
TimeOfDay Morning Different Evening A 12/15
A 12/3
I'm presently walking through the recordsets using DAO...
but I feel this could be handled more efficiently with SQL?