May 30, 2009 at 8:15 am
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
May 30, 2009 at 10:37 pm
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)
May 31, 2009 at 12:23 am
Hi,
you might try this-
select ...(your query goes here)
except
select top 1 ..(your query goes here)
May 31, 2009 at 1:04 am
it wont work .......as its doing intersaction ...
Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
May 31, 2009 at 1:39 am
Thanks Everyone!!!
I tried using Except Keyword and my purpse got solved.
May 31, 2009 at 3:18 am
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