Re: Return only most recent date records

From: DataGuy (nospam_at_hotmail.com)
Date: 02/07/05


Date: Mon, 7 Feb 2005 11:30:37 -0500

Per,

Can you explain the predicate 'TOP 1*'? Don't I need to tell the SELECT
statement which field to pick the TOP from?

This is my first use of 'select', so I'm on the learning curve here.

Thank you!

"Per Larsen" <perl.news@tiscali.no> wrote in message
news:M7MNd.98230$Vf.3861998@news000.worldonline.dk...
> DataGuy wrote:
>> Hello!
>>
>> I have a table that I use to track files being transferred to & from our
>> company. When a new file arrives, it's 'Transfer_Date' & 'Part_#' is
>> logged.
>>
>> I need to figure out a way to create a query to return only the most
>> recent record for each part number. I thought if I could maybe do
>> something like this:
>>
>> MIN=(Now - [CAD LOG]![Transfer Date])
>
> select top 1 *
> from <table>
> order by [Transfer Date] desc
>
> hth
> PerL
>
>>
>> But I cannot get it to return anything. It doesn't error out, but I get
>> no results, so I don't know what to fix.
>>
>> Any suggestions are appreciated.
>>
>> Thank you!



Relevant Pages

  • Re: list argument problem
    ... My application is actually combination of perl and prolog, ... would call the prolog code and then get the result back from the ... predicate arguments. ...
    (comp.lang.prolog)
  • Re: list argument problem
    ... May I know specifically which section that causes the design unwise? ... My application is actually combination of perl and prolog, ... predicate arguments. ...
    (comp.lang.prolog)
  • Re: Pthread programming: about the lost condition signals.
    ... If a thread makes the predicate true and it's supposed to be false, ... signals to get the appropriate A or B thread to fix the problem. ... or use broadcasts. ...
    (comp.programming.threads)
  • Re: List<>.Exists()???
    ... That should fix it; for completeness: ... The "predicate" is just a method that accepts the item to be tested ... Marc ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: List<>.Exists()???
    ... I think it may have something to do with the fact that the help article for ... That should fix it; for completeness: ... a condition (specified as a predicate); for example, ...
    (microsoft.public.dotnet.languages.csharp)