Getting minimum of top n rows without using subquery

  • winmansoft (3/7/2013)


    Lynn Pettis (3/6/2013)


    Does this get you started?

    with TopDates as (

    select top (100)

    MyDates

    from

    dbo.MyTable

    order by

    MyDates desc

    )

    select min(MyDates) from TopDates;

    That will work with sql good. We have MSAccess database also.I don't think with TopDates will work with Access database or does it??

    MSAccess .. huh .. quite a thing for the climax ...

    ..

    No idea .. whether this would work in MSAccess or not ..

    try MSAccess forums ..

    ~ demonfox
    ___________________________________________________________________
    Wondering what I would do next , when I am done with this one :ermm:

Viewing post 31 (of 30 total)

You must be logged in to reply to this topic. Login to reply