SQL Server : Adding RowId to Previous Result
Example:
Select row_number () over ( order by b.FieldName) , b.* from
(
select .....
)b
Real Code:
select row_number()over(order by b.DateResult) ,*
from(
SElect t.ECI,min(t.From_Date) as DateResult from @Table2 t group by ECI
)b
1 Comments:
for more stuff on govt. exams just click on the site http://www.kidsfront.com/
Post a Comment
<< Home