Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 append identity coloumn to quer result

Author  Topic 

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2008-08-14 : 18:01:53
I have a query which i use in the front end(asp.net application)

but there is no identity coloumn in the table from which i pull the results. so i want to append the identity coloumn to the query result.

How can i do that

thanks in advance

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-08-14 : 22:56:29
Maybe put result in temp table first like this:

SELECT IDENTITY(int, 1, 1) AS Col, * INTO #tmp FROM table ...
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-18 : 05:58:09
quote:
Originally posted by akpaga

I have a query which i use in the front end(asp.net application)

but there is no identity coloumn in the table from which i pull the results. so i want to append the identity coloumn to the query result.

How can i do that

thanks in advance



Why dont you do this numbering when you represent the data in the page?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -