G
Guest
I've got a table called tblFinalJEOutput with 1,600 records. I've got a
select query that finds the Max of Amount, grouped by Product, DC_Ind, and
RndErr giving me a set a data like this:
Product DC_Ind MaxOfAmount RndErr
989824 C 4534.83 ($0.21)
989824 D 8606.22 ($0.21)
991804 C 39599.04 $0.00
991804 D 35310.96 $0.00
992526 C 54248.14 $0.01
992526 D 13096.21 $0.01
I've formed a relationship between my select query and the main table
(tblFinalJEOutput) in order to identify which records in tblFinalJEOutput
contain the Max Amount.
Now, I want to issue an Update query for these records with logic such as:
UPDATE Amount TO Amount - Abs(RndErr) WHERE Amount = MaxOfAmount AND RndErr
< 0 AND DC_Ind = "C"
I'm getting "operation must use updateable query" errors. Is there a better
way to approach this? Basically, I need to first identify the Max Amount by
Product, then Update the Amount to Amount - Abs(RndErr) using the criteria
specified above.
Any ideas?
select query that finds the Max of Amount, grouped by Product, DC_Ind, and
RndErr giving me a set a data like this:
Product DC_Ind MaxOfAmount RndErr
989824 C 4534.83 ($0.21)
989824 D 8606.22 ($0.21)
991804 C 39599.04 $0.00
991804 D 35310.96 $0.00
992526 C 54248.14 $0.01
992526 D 13096.21 $0.01
I've formed a relationship between my select query and the main table
(tblFinalJEOutput) in order to identify which records in tblFinalJEOutput
contain the Max Amount.
Now, I want to issue an Update query for these records with logic such as:
UPDATE Amount TO Amount - Abs(RndErr) WHERE Amount = MaxOfAmount AND RndErr
< 0 AND DC_Ind = "C"
I'm getting "operation must use updateable query" errors. Is there a better
way to approach this? Basically, I need to first identify the Max Amount by
Product, then Update the Amount to Amount - Abs(RndErr) using the criteria
specified above.
Any ideas?