Recent content by solidfish

  1. S

    Access SQL query with conditions?

    Sorry it is but my code was not complete, it was just pseudo code to show you what I was trying to do. I am attempting the two queries with UNION right now. Many thanks for the quick responses!
  2. S

    Access SQL query with conditions?

    I am trying to update a table using values from a mapping table. I think its an UPDATE and SELECT statement but I cant figure out how to handle conditions. This is in VBA Access. I have two tables with following fields: mainTable: [column1],[column2],[mapColumnA],[mapColumnB] mapTable...
  3. S

    Improve query performance - copy and sum

    Perhaps this will make the question more clear - in the following SQL, the [Date] and [Carrier] values need to come from another variable, not the 'stagingTable'. Is it possible to insert those variables into this query? sql = "INSERT INTO " & outputTable...
  4. S

    Improve query performance - copy and sum

    Ok I see what you are doing. I'm trying this out now. One more quick question on that SUM function please. So the table I am inserting into has a field that does not come from the second table. Here is the complete sql i have: "INSERT INTO " & outputTable ([Date],[Carrier],[Division],[Plan...
  5. S

    Improve query performance - copy and sum

    Yes in the first function the planCode comes from the first query. It could look something like rs![Plan Code] As for the second function, are you saying I should remove the DoWhile and do the single INSERT statement? Many thanks for your help!
  6. S

    Improve query performance - copy and sum

    Hello, I was searching for some help trying to improve the performance of VBA function in access. I have two functions that are taking 40+ minutes to complete against a table that has 300,000+ records. I'm running on a quad i5 processor laptop. I'm not sure if my query can be improved, or if...
Back
Top Bottom