-2

i want to bind grid look like this or sql query through bind

look like

enter image description here

Ketan mevada
  • 152
  • 1
  • 12

1 Answers1

2
DECLARE @startDate DATETIME
DECLARE @endDate DATETIME
SET @startDate = '2014-06-02'
SET @endDate = '2014-06-26'
;WITH dates AS 
(
    SELECT @startdate as Date,DATENAME(Dw,@startdate) As DayName
    UNION ALL
    SELECT DATEADD(d,1,[Date]),DATENAME(Dw,DATEADD(d,1,[Date])) as DayName
    FROM dates 
    WHERE DATE < @enddate
)

SELECT Date,DayName frOM dates where DAYNAME in('Monday','Tuesday','Wednesday')
user3090790
  • 826
  • 1
  • 7
  • 14