1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <>
-- Create date: <19/01/2010>
-- Description: <renvois la liste des salariées avec plusieurs absences dans une journée>
-- =============================================
alter PROCEDURE [dbo].[PS_Test_Select_Employe_MultiAbs_Day]
-- Add the parameters for the stored procedure here
@date_debut as datetime,
@date_fin as datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT EMPLOYEE_SURNAME,
EMPLOYEE_FIRST_NAME,
ABS_TYPE_ABBREVIATION,
TOTAL_DATE,
HOURS
FROM dbo.ESTIMATED_DAILY_ABSENCE
WHERE TOTAL_DATE BETWEEN @date_debut AND @date_fin
GROUP BY TOTAL_DATE
HAVING COUNT (DISTINCT TOTAL_DATE)>1
END
GO |
Partager