Добрый день!
мне нужно чтобы отображались все даты на протяжении 14 дней от заданной даты
сейчас отображаются только те дни у которых стоит отметка
например: 14.08,16.08,20.08- массаж результат 4.08,16.08,20.08- массаж
нужно:14.08,15.08,16.08,17.08....- массаж
select
CONVERT(VARCHAR(5), ServDate, 08) AS ServDate,
Quantity,
Additional,
Visit.OpenDate as OpenDate,
Visit.CloseDate as CloseDate,
EmployeeSet.Name as Name11,
Price
FROM
ServedSet
INNER JOIN
( SELECT
Name,
CONVERT (date, OpenDate) as OpenDate,
CONVERT (date, CloseDate) as CloseDate,
VisitsSet.Id AS VisitID,
Birth,
Clients_Category as Category
FROM
VisitsSet
JOIN ClientsSet
ON Visits_Clients = ClientsSet.Id
) AS Visit
ON ServedSet.Served_Visits = Visit.VisitID
INNER JOIN
ServicesSet
ON Served_Services = ServicesSet.Id
INNER JOIN
EmployeeSet
ON Served_Employee = EmployeeSet.Id
WHERE
IsServed in (0,1)
AND
OpenDate = @Zaezd AND
Visit.Name = (@Client)
AND
Type !='СБ'