Search results

  1. S

    Tidy up Queries

    There appears to be an idiosyncrasy within the data set, current(live data) uses a string, But yet historical data uses a number. I am trying to run the same set of queries in both the Live data and then again in historical data. I am in the very early stages and trying to create a historical...
  2. S

    Tidy up Queries

    q1 code SELECT decrace.drdate, decrace.drid, decrace.drcname, CCur(Mid([drprize],1)) AS PrizeConvert FROM decrace INNER JOIN course ON decrace.drcname = course.cname WHERE (((decrace.drdate)=Date()) AND ((course.ccountry)="GB")) ORDER BY decrace.drcname, CCur(Mid([drprize],1)) DESC; q2 code...
  3. S

    Tidy up Queries

    Hi Cj do you know where I could find an example code for aliasing?
  4. S

    Tidy up Queries

    Hi plog. Theses are all select queries. And the reason that I want to "tidy up" I would rather take the pain now and sort it out rather than keep running them all each day
  5. S

    Tidy up Queries

    @ebs17 Can I put a "from" within a "from" ? Is there anywhere that you could direct me that shows example code?
  6. S

    Tidy up Queries

    Apologies for my poor terminology, I run the third query and it looks up data from the second query(which references the first query). The database I am calling from produces new data every day, so need to run query1 to obtain the new source data to work with in query2 and then query3.
  7. S

    Tidy up Queries

    Good Morning Good People, I have ended up with 2 queries feeding data to third query. I have to run query1 to feed data to query2 (run it) and then feed the data to query3. It is getting messy and I want simplify to 1 overall query which in essence will run the first two, in order, and thus...
  8. S

    Solved Working with Dates

    Thanks for your help CJ Appreciate it.
  9. S

    Solved Working with Dates

    Hi CJ, I want this but for each date in any given time period. The code you helped with is perfect for 1 day. I need it to loop through the dates and generate this for each date. The attached document (Post34) shows what I currently getting
  10. S

    Solved Working with Dates

    data output "jumbled up" As you can see its a bit mixed up. On the "dayrank" column helen should be ranked 1 on 21/52024, norman 2, horace 3, billy 4 etc The column day rank appears to be operating on the whole data set not differentiating each day.
  11. S

    Solved Working with Dates

    Apologies CJ, i am not being deliberately obtuse, cautious yes. I was taught to be cautious. Thank you for your patience. To get the "five most recent days" data i determined that the most recent days each rep worked will almost certainly be contained in the last three years. So my logic was...
  12. S

    Solved Error message will not close

    Hello Doc man, Thank-you for that explanation. Is there anything I can write into the code to "stop on error" or something. It is ok if there are only a few hundred records but when there are tens of thousands you never know if its just the time it takes or stuck somewhere.
  13. S

    Solved Working with Dates

    Thank you MajP I had been wondering how you all managed with such long lines of code! Will the code in that format still "run" or is it for display purposes only?
  14. S

    Solved Working with Dates

    @CJ_London I am making progress, i have followed your instruction and achieved the desired result for that day. My next objective (break things down into smaller problems I thought) was to achieve the desired results over a longer time period so selected about a week to keep the data output to...
  15. S

    Distinct

    Thanks a lot guys, I understand what is going on now with the operator. Sorry for being a PITA. I needed to add more data to the query to stop it removing duplicates that I wanted to keep
  16. S

    Solved Error message will not close

    Thanks that worked. I am Limiting the query to one day so there are only a few hundred records
  17. S

    Solved Error message will not close

    when i try to close, bingging and bonging
  18. S

    Distinct

    I am looking for Distinct values in only one of the lists
  19. S

    Distinct

    SELECT DISTINCT and then a field list. can I apply to only a certain field?
  20. S

    Distinct

    I have used DISTINCT in the sql straight after select. However the search is not showing sales of the same item price when I only wanted distinct order dates. Can DISTINCT be applied to certain fields only?
Back
Top Bottom