+ Reply to Thread
Results 1 to 3 of 3

Select query for records from the last date.

  1. #1
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Select query for records from the last date.

    I am currently getting all the records from my Access table (CALC_TD) and sorting the result in Excel to get what I need, however, my CALC_TD table is now far to big to do this efficiently so I am trying to get only the records with the most recent date from my Access table.


    Please Login or Register  to view this content.
    Unfortunately my SELECT query is not working as expected. Not sure what the problem is, output seems to be random. If I change the order by to asc the result is the same as desc.

    Any assistance appreciated.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Select query for records from the last date.

    SELECT * FROM [CALC_TD] where [C_D] between txtStartDate and txtEndDate

  3. #3
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: Select query for records from the last date.

    Quote Originally Posted by ranman256 View Post
    SELECT * FROM [CALC_TD] where [C_D] between txtStartDate and txtEndDate
    I don't know what the end date is, that is why I am trying to get only the records with the latest date.

    For the time being I am just getting all the records that match Now - 90 days.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Writing a SELECT query to return only records with duplicate values in one column
    By mc84excel in forum Access Tables & Databases
    Replies: 3
    Last Post: 04-24-2015, 12:16 AM
  2. Query - Multiple Records?
    By TehNoob2010 in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-30-2012, 06:50 AM
  3. Replies: 5
    Last Post: 04-05-2012, 01:29 PM
  4. Query Records
    By madcat302 in forum Excel General
    Replies: 0
    Last Post: 05-08-2010, 06:37 AM
  5. MS Query to Display All Records
    By pickledmuffin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2008, 08:56 PM
  6. No of Records returned by a Query
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2005, 10:06 AM
  7. [SOLVED] MS Query-ability to edit select query
    By Robert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2005, 09:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1