Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 25th, 2004, 07:12 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default can i generate index column

i used this query to generate an ascending counting from 1 to no of records but when i use order by i can't do that could any one help,
this is the query an d it works will:

select (select count(e1.firstname) from employees as e1 where e1.EmployeeID<=e2.EmployeeID),e2.firstname from employees as e2

but when adding order by like follows
select (select count(e1.firstname) from employees as e1 where e1.EmployeeID<=e2.EmployeeID),e2.firstname from employees as e2order by e2.firstname

any have a comment

Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
generate index rshan XSLT 1 May 23rd, 2007 01:14 AM
previous column & next column ct Excel VBA 4 August 19th, 2005 04:50 AM
template column and bound column hidayah ASP.NET 1.x and 2.0 Application Design 1 April 9th, 2005 03:50 PM
How to Generate my own SESSIONID anand_asv .NET Framework 2.0 0 March 2nd, 2005 10:14 AM
Compare two Items of data(in column A and column B ever Excel VBA 6 February 13th, 2004 02:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.