Click here to Skip to main content
15,907,395 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, in my application i am creating issues and loading to the DB, there is another tab in my form which will allow users to update the issue, and the updates will be shown in the datagridview next to it i.e. i have another table which will contain all the updates of the issues. Now my concern is to show all the updates one by one serially, what ever be the SL No in the database, it should show all the updates serially.
my issue_update table looks like this
SLNo int not null ,
Descrptn(8000) not null,
Date Datetime not null,
IssID varchar(50) not null

SL No is getting incremented automatically
and IssID is the main issue id for which we are updating
Updated 13-Aug-10 2:59am
R. Giskard Reventlov 13-Aug-10 9:00am    
Is there a question in there?

1 solution

You Can use Row_Number() function to get serial numbers instead of SL No column

Select Row_Number() over (order by Date) as [Sr No.] from TableName

Hope it helps...
Share this answer
souvikd 13-Aug-10 10:04am    
Hey Jayant it worked ... thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900