Re: Row Number in SQL Server

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: David Portas (REMOVE_BEFORE_REPLYING_dportas_at_acm.org)
Date: 04/22/04


Date: Thu, 22 Apr 2004 17:58:57 +0100

If it's not for presentation but for use in another query/process then there
may be a better way. Perhaps the two queries could be combined in some way
to avoid having to add a row number. Post your DDL, sample data and
requirements if you need some help with it.

-- 
David Portas
SQL Server MVP
--


Relevant Pages

  • Re: Print line in order by greater value
    ... There are several Select count queries. ... > Where are all these totals coming from? ... > David Portas ... > SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: interesting problem
    ... It's useful to keep a table of Numbers in your database to help with queries ... David Portas ... SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: How to improve SQL Server operations
    ... You might try running your problem queries through the Index Tuning Wizard. ... >> Dan Guzman ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: reindex or update stat
    ... change in the way the queries are run. ... Andrew J. Kelly ... SQL Server MVP ... > I have a database that will have couple thousands row inserted normally, ...
    (microsoft.public.sqlserver.server)
  • Re: Maximum UNION statements in a query
    ... Shoot yourself. ... So, not only will your queries perform badly, but you walk into a 256 table ... No matter if you have views etc, but 256 base tables is all you get. ... Mike Epprecht, Microsoft SQL Server MVP ...
    (comp.databases.ms-sqlserver)