4
Answers

How to create date columns automatically

madhu goud

madhu goud

9y
539
1
How to create date columns automatically  from start date to end date 
 
create table demo table
(
Id int primary key identity(1,1),
Name varchar(50),
StartDate date,
EndDate date
)
 
i have given start date 1/7/2015 and end date 1/10/2015 , in out put i want to add extra (month wise )columns automatically ,like
 
ID      Name      Start Date        End Date          1/7/2015      1/8/2015      1/9/2015      1/10/2015
Answers (4)