Select que pega menor data


  • Oi gente, tudo bem?

    Estou precisando pegar a menor data de uma seleção.

    Ex.: cpf        data

          222       15/05/2014

          222       16/05/2014 ...

    quero pegar, estre estas acima, a menor data. Ou seja, no exemplo, dia 15/05/2014

    Alguém pode me ajudar?

    Thursday, May 15, 2014 8:35 PM


  • Hi Mari11,

    This is English forum, and it seems that the language you posted is Portuguese. I have translated it using Google Translation.
    Hi guys, okay?
    I am needing to get the earliest date of a selection.
    Eg cpf date
           222 15/05/2014
           222 05/16/2014 ...
    want to get, these estre above, the earliest date. That is, in this example, on 15/05/2014
    Can anyone help me?

    And from your description, you want to get the record which the date value is the earliest date. If in this case, please refer the useful links below.
    Find first order date in MDX
    Select record with oldest date

    If this is not what you want, please elaborate the requirement in English, so that we can make further analysis.


    Charlie Liao
    TechNet Community Support

    Friday, May 16, 2014 6:49 AM