Manish Kumar

Manish Kumar

  • NA
  • 1.4k
  • 7.6k

Employee leave day

Apr 22 2016 4:04 AM
Hi,
 
I have a table like below structure
declare @tbl table
(empid int,noOfDay int,leavedate datetime)
insert into @tbl values (001,2,'2016-04-22'),(002,1,'2016-01-18'),(003,3,'2005-07-14')
and data is like
empid     noOfDay   leavedate
---------------------------------------
001           2             2016-04-22
002           1             2016-01-18
003           3             2005-07-14
 
i want my out put result in below format
 

empid noOfDay leavedate
---------------------------------------
001       1             2016-04-22
001       1             2016-04-22 
002       1             2016-01-18
003       1             2005-07-14
003       1             2005-07-14
003       1             2005-07-14 
 
 
Thanks in advanced.
Regards,
Manish 

Answers (3)