Matthew Small wrote: > How can I get SQL server to automatically number my rows of a recordset, > as I retrieve it? > > If I have the following information in a table (example data) > > Name Age > Joe 20 > Sally 14 > Jim 15 > > And I do a query: > > Select somefunction() as rownum, name, age from table
Doesn't SQL server support sequences? In that case somefunction would be <next value expression>. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

