record #1 IKEY = 101 | MyField = 10 | rTYPE = Item record #2 IKEY = 102 | MyField = 20 | rTYPE = Item record #3 IKEY = 103 | MyField = 30 | rTYPE = Item record #4 IKEY = 100 | MyField = 00 | rTYPE = Rollup record #5 IKEY = 201 | MyField = 18 | rTYPE = Item record #6 IKEY = 202 | MyField = 24 | rTYPE = ItemWhere the total that should be written to MyField for record IKEY 100 should be 60. I have pulled out all but the meat of the query here:
-- Roll up the values select sum(MyField) as RollUp from foo where left(IKey,1) = '1' -- insert the rolled up values update foo set MyField = RollUp where IKey = '100'My humble thanks in advance,
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams