Search results

  1. D

    Loop and test Child records - update parent

    mySQL is the backend. I am not so much worried about size as I am about execution time on the query - might be talking about 175,000 records
  2. D

    Loop and test Child records - update parent

    Do you believe this approach would be a more efficient approach and if so, why? It seemed to run slower that the count(*) but I cant imagine that being good across two very large tables - thoughts?
  3. D

    Loop and test Child records - update parent

    Thanks for this suggestion. I am not having any success in getting it to work right. Please see posts (10 and 17). I am hoping to get yours to work as these two tables will be the largest two tables in operation. Your suggesting may be the most efficient ?? I'm hoping anyway. Any help getting it...
  4. D

    Loop and test Child records - update parent

    I have run the update with the inner join and when the child records are 1 of 3 true, it wants to update three rows. It should only be updating one row. Here is the code: UPDATE tblSettlements INNER JOIN (SELECT tblPaymentsSub.tblSettlements_SettlementID, tblPaymentsSub.Paid FROM...
  5. D

    Loop and test Child records - update parent

    Hey June7 I will be trying yours tonight to update only those that have all paid. Thanks for the inputs.
  6. D

    Loop and test Child records - update parent

    After a few column name tweaks here is a final version that is working correctly: UPDATE tblSettlements SET tblSettlements.Paid = -1 WHERE tblSettlements.Paid=0 And (((Select Count("*") from tblPaymentsSub As B Where B.tblSettlements_SettlementID=tblSettlements.[SettlementID])=(Select...
  7. D

    Loop and test Child records - update parent

    Hello, Below is the code being used at the moment and it does update tblsettlements.Paid field to 1. The problem is that it is doing so EVEN WHEN the child record fields from tblPaymentsSub are NOT all paid. It does not seem to be reading the three records correctly (where 1 true and two of...
  8. D

    Loop and test Child records - update parent

    Thank you all for your replies. Great stuff -I am still working through them. I have set up the workspace solution to test and I am getting only the msgbox and no update at present. I have added the code to an on open event for a form that can be called via AutoExec along with all startup update...
  9. D

    Loop and test Child records - update parent

    I have been searching to no avail to find a solution to the problem below (please see attachment for more details). Any help is appreciated - air code, referrals to similar solutions, etc. Note: Table A gets a single parent record created and the paid default is false (zero). Table B...
Back
Top Bottom