Re: Nearest max date before a specified one




SELECT Max(tblDates.dEntryDate) as MaxDate
FROM R tblDates
WHERE (((tblDates.dEntryDate)<CDate('1.1.2005')));

Frank wrote:
>
> Hi,
>
> I am trying to create an SQL statement which would return to me the maximum
> date before a specified date. I was able to get a list of records with dates
> prior to the one I enter but not the last one. Can anyone help? Thanks.
>
> SELECT tblDates.dEntryDate
> FROM R tblDates
> WHERE (((tblDates.dEntryDate)<CDate('1.1.2005')));
>
> Frank
.



Relevant Pages

  • Nearest max date before a specified one
    ... I am trying to create an SQL statement which would return to me the maximum ... FROM R tblDates ... Frank ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: Access having run time errors while selecting from odbc linked table
    ... Ok Frank, here ya go: ... Date and Load are variables that are collected by an input box so the sql statement can be dynamic in nature. ... >> Dim con As Object ... >> The exact same code sequence is used in the Database to select items from ...
    (microsoft.public.data.odbc)
  • Re: Nearest max date before a specified one
    ... you had a table named "R" but wished to refer to the table in the query as ... named tblDates that you wanted to refer to as R to cut down on typing or as a ... Frank wrote: ... I have noticed in both responses the letter "R" ...
    (microsoft.public.access.queries)
  • Re: Counting days in a crosstab query
    ... How would those two fields fir into the sql statement you created. ... "Duane Hookom" wrote: ... > The SQL view of the query should be: ... > FROM tblDates ...
    (microsoft.public.access.reports)
  • RE: Need SQL Statement
    ... >Thanks, Frank. ... the correct query. ... >guidance in terms of a SQL statement. ... >> write an append query in design mode that would append ...
    (microsoft.public.access.queries)