All rows except the first rows should be printed.

  • Hi Every one !

    I have a request in which i need query result set having data eliminating the first row of the result set.

    all rows except the first rows should be printed.

    Any help will be highly appreciated.

    Thanks

    -Meghna

  • Give me the table structure ...i.e. the create table script ..

    It should not be difficult...

    Abhay Chaudhary
    Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)

  • Hi,

    you might try this-

    select ...(your query goes here)

    except

    select top 1 ..(your query goes here)

  • it wont work .......as its doing intersaction ...

    Abhay Chaudhary
    Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)

  • Thanks Everyone!!!

    I tried using Except Keyword and my purpse got solved.

  • If you are working with SQL 2005 then you might want to have a look at the ROW_NUMBER() function which would quite faster than the EXCEPT operator.

    --Ramesh


Viewing 6 posts - 1 through 5 (of 5 total)

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