2PTTechnology

The platform that enables you to build rich, interactive communities
Welcome to 2PTTechnology Sign in | Join | Help
in Search

auto increment counter transact SQL 2008

Last post 03-05-2009, 12:15 PM by twaligora. 0 replies.
Sort Posts: Previous Next
  •  03-05-2009, 12:15 PM 206

    auto increment counter transact SQL 2008

    select

       distinct PrDt,

       ROW_NUMBER() Over(Order by PrDT) as RowNumber

    from MyTable

    group by PrDt

    --RESULT

    PrDt                         RowNumber

    ---------------------- --------------------

    03-02-2009             1

    03-04-2009             2

    03-05-2009             3

    (3 row(s) affected)

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems