K
KimD
I am trying to set up a query to calculate flow from a table which contains
date and other relevant information. The calculation changes depending on
the date. For example, the table is called FlowDataRearragned and has the
fields [FlowDate] (formated as short date), [InfluentFlow] and
[EffluentFlow]. I'm calculating [EffluentFlow] from an Update query, but
need to change the equation depending on which month the [FlowDate]
represents. The current SQL looks like this:
UPDATE FlowDataRearranged SET FlowDataRearranged.[EffluentFlow] =
(([FlowDataRearranged]![Influentflow])+(([FlowDataRearranged]![Rain]-(0.194*7))/12)*1200*7.481)
WHERE (((FlowDataRearranged.[Effluent Flow]) Is Null) AND
((FlowDataRearranged.FlowDateandTime) Between #8/1/2008# And #8/30/2008#))
I want to add a portion uses a slightly different equation for Sept, another
for Oct and so on. I need the calculated data to all be in one field, and
ideally dependant only on the month, as the project will span multiple years.
Using "Or" between each additional equation isn't working. Any help will be
greatly appreciated.
Thank you in advance,
date and other relevant information. The calculation changes depending on
the date. For example, the table is called FlowDataRearragned and has the
fields [FlowDate] (formated as short date), [InfluentFlow] and
[EffluentFlow]. I'm calculating [EffluentFlow] from an Update query, but
need to change the equation depending on which month the [FlowDate]
represents. The current SQL looks like this:
UPDATE FlowDataRearranged SET FlowDataRearranged.[EffluentFlow] =
(([FlowDataRearranged]![Influentflow])+(([FlowDataRearranged]![Rain]-(0.194*7))/12)*1200*7.481)
WHERE (((FlowDataRearranged.[Effluent Flow]) Is Null) AND
((FlowDataRearranged.FlowDateandTime) Between #8/1/2008# And #8/30/2008#))
I want to add a portion uses a slightly different equation for Sept, another
for Oct and so on. I need the calculated data to all be in one field, and
ideally dependant only on the month, as the project will span multiple years.
Using "Or" between each additional equation isn't working. Any help will be
greatly appreciated.
Thank you in advance,