lets consider i have a table like this
create table #temp
(
Id int primary key identity(1,1),
amount decimal(10,0),
inserted_date datetime,
empId int,
series_no int
)
when i will insert record with empId 1000 ,then i want to insert serial no 1,2,3 for that employee id.again if employee id 1001 then serial number start with 1,2,3 so on..
how could i achieve this any suggestion?