Recent content by Acc

  1. A

    Using a Condition from one table in a UNION SELECT query

    Hi, just wanted to say thanks again you have been a great help. I currently have a basic mock up working with some limited data and am trying to implement your suggestions to make it work better before feeding in all the data. Titles and authors are already stored in a separate table, I am...
  2. A

    Using a Condition from one table in a UNION SELECT query

    I will redesign the Daily Sales input method to make it into a single table and index that as well. Then use the two indexed tables to build the Monthly and Daily sales together as we have previously discussed? Sound like a better solution? Once I have the two tables together I will be adding...
  3. A

    Using a Condition from one table in a UNION SELECT query

    The Digital Sales table is indexed by Sales Month, ISBN and Account as a single Index, the Daily Sales is a query pulling together data from several other tables, so not sure if I can index that. A little over 1 million rows, so .... too many?
  4. A

    Using a Condition from one table in a UNION SELECT query

    Aside from performance it appears to be, yes. I can only see the first few rows, simply because scrolling through the data or exporting it takes a long time, but they look to be right.
  5. A

    Using a Condition from one table in a UNION SELECT query

    The query runs, but is too slow to be useable. Would it work better if I created a field concatenating SalesMonth, ISBN, Vendor and Account for each table and used that as the Where criteria instead?
  6. A

    Using a Condition from one table in a UNION SELECT query

    Thanks, I will try this out right away!
  7. A

    Using a Condition from one table in a UNION SELECT query

    OK. The monthly sales are Actuals reported by retailers and are recorded in a separate database. The Daily Sales are reports received daily from retailers showing that days sales. The two do not always (if ever) match, but they are close. The daily sales and monthly sales start at different...
  8. A

    Using a Condition from one table in a UNION SELECT query

    OK I've changed things around to try to make this easier, I now have two tables: Combined Daily Sales with the fields: Sales Month Date of Sale Vendor Account ISBN Free/Paid Units Revenue Which_Database and Combined Monthly Sales with the fields: Sales Month Vendor Account ISBN Unit Sales...
  9. A

    Using a Condition from one table in a UNION SELECT query

    OK I now have 2 tables as follows Monthly Sales Month |Account |ISBN |Sales 01/01/2014|RetailerX|12345ABCDE|5 01/01/2014|RetailerX|12345ABCDF|2 01/02/2014|RetailerY|12345ABCDF|6 01/02/2014|RetailerY|12345ABCDG|9 Daily Sales Month |Account |ISBN |Sales...
  10. A

    Using a Condition from one table in a UNION SELECT query

    The table design is inherited, although I am trying to clean it up. The reason they end up on separate lines is that they are also grouping by the Identifier field, I haven't typed that out in the example as it isn't something that will affect the question, should have realised it would make...
  11. A

    Using a Condition from one table in a UNION SELECT query

    Sorry I must not be explaining myself very well. I have about 8 tables. One is called Digital Sales and has information on all retailers, the others are each called RetailerX Daily Sales. I need to pull out the records from all tables where the date for each Daily Sales table is greater than the...
  12. A

    Using a Condition from one table in a UNION SELECT query

    That's not quite enough I don't think, though it might be and I'm not understanding (fairly new to this). Here's an example of what the data looks like (there are more fields in all cases, but they don't matter for this question) Digital Sales Sales Mth |Source |Account |Units...
  13. A

    Using a Condition from one table in a UNION SELECT query

    Hi, I am having a little trouble with the following problem and was wondering if anyone could help. I am building a query from several input tables Digital Sales and Daily Sales for a number of retailers, whereby I only wish to incorporate Daily Sales after the date of the latest Monthly Sales...
Back
Top Bottom