ProjetThe/procedureMaison.sql

96 lines
5.1 KiB
MySQL
Raw Normal View History

2019-01-20 11:46:45 +01:00
/*
EEEEEEEEEEEEEEEEEEEEEEVVVVVVVV VVVVVVVVEEEEEEEEEEEEEEEEEEEEEENNNNNNNN NNNNNNNNTTTTTTTTTTTTTTTTTTTTTTT
E::::::::::::::::::::EV::::::V V::::::VE::::::::::::::::::::EN:::::::N N::::::NT:::::::::::::::::::::T
E::::::::::::::::::::EV::::::V V::::::VE::::::::::::::::::::EN::::::::N N::::::NT:::::::::::::::::::::T
EE::::::EEEEEEEEE::::EV::::::V V::::::VEE::::::EEEEEEEEE::::EN:::::::::N N::::::NT:::::TT:::::::TT:::::T
E:::::E EEEEEE V:::::V V:::::V E:::::E EEEEEEN::::::::::N N::::::NTTTTTT T:::::T TTTTTT
E:::::E V:::::V V:::::V E:::::E N:::::::::::N N::::::N T:::::T
E::::::EEEEEEEEEE V:::::V V:::::V E::::::EEEEEEEEEE N:::::::N::::N N::::::N T:::::T
E:::::::::::::::E V:::::V V:::::V E:::::::::::::::E N::::::N N::::N N::::::N T:::::T
E:::::::::::::::E V:::::V V:::::V E:::::::::::::::E N::::::N N::::N:::::::N T:::::T
E::::::EEEEEEEEEE V:::::V V:::::V E::::::EEEEEEEEEE N::::::N N:::::::::::N T:::::T
E:::::E V:::::V:::::V E:::::E N::::::N N::::::::::N T:::::T
E:::::E EEEEEE V:::::::::V E:::::E EEEEEEN::::::N N:::::::::N T:::::T
EE::::::EEEEEEEE:::::E V:::::::V EE::::::EEEEEEEE:::::EN::::::N N::::::::N TT:::::::TT
E::::::::::::::::::::E V:::::V E::::::::::::::::::::EN::::::N N:::::::N T:::::::::T
E::::::::::::::::::::E V:::V E::::::::::::::::::::EN::::::N N::::::N T:::::::::T
EEEEEEEEEEEEEEEEEEEEEE VVV EEEEEEEEEEEEEEEEEEEEEENNNNNNNN NNNNNNN TTTTTTTTTTT*/
IF OBJECT_ID ( 'SelectEventByDate', 'P' ) IS NOT NULL
DROP PROCEDURE SelectEventByDate;
GO
CREATE PROCEDURE SelectEventByDate
@dateV date
AS
2019-01-24 22:24:05 +01:00
SELECT * FROM [dbo].[T_event] Where CAST(E_date AS DATE) = @dateV;
2019-01-20 11:46:45 +01:00
RETURN
GO
IF OBJECT_ID ( 'SelectEventBetweenTwoDateTime', 'P' ) IS NOT NULL
DROP PROCEDURE SelectEventBetweenTwoDateTime;
GO
CREATE PROCEDURE SelectEventBetweenTwoDateTime
@dateStart datetime,
@dateEnd datetime
AS
2019-01-24 22:24:05 +01:00
SELECT * FROM [dbo].[T_event] Where E_Date>=@dateStart AND E_Date<@dateEnd;
RETURN
GO
IF OBJECT_ID ( 'ListParticipantEquipe', 'P' ) IS NOT NULL
DROP PROCEDURE ListParticipantEquipe;
GO
CREATE PROCEDURE ListParticipantEquipe
@ID_equipe int
AS
SELECT T_beneficiaire.ID_beneficiaire, T_beneficiaire.B_nom,T_beneficiaire.B_prenom,T_beneficiaire.B_anniversaire,
T_beneficiaire.B_img FROM [dbo].[T_listParticipant] RIGHT JOIN T_beneficiaire
ON T_listParticipant.ID_benificiaire=T_beneficiaire.ID_beneficiaire AND T_listParticipant.ID_equipe=@ID_Equipe
WHERE T_listParticipant.ID_equipe=@ID_Equipe;
2019-01-20 11:46:45 +01:00
RETURN
GO
2019-01-27 10:22:31 +01:00
2019-01-20 11:46:45 +01:00
/*
RRRRRRRRRRRRRRRRR EEEEEEEEEEEEEEEEEEEEEEPPPPPPPPPPPPPPPPP AAA
R::::::::::::::::R E::::::::::::::::::::EP::::::::::::::::P A:::A
R::::::RRRRRR:::::R E::::::::::::::::::::EP::::::PPPPPP:::::P A:::::A
RR:::::R R:::::REE::::::EEEEEEEEE::::EPP:::::P P:::::P A:::::::A
R::::R R:::::R E:::::E EEEEEE P::::P P:::::P A:::::::::A
R::::R R:::::R E:::::E P::::P P:::::PA:::::A:::::A
R::::RRRRRR:::::R E::::::EEEEEEEEEE P::::PPPPPP:::::PA:::::A A:::::A
R:::::::::::::RR E:::::::::::::::E P:::::::::::::PPA:::::A A:::::A
R::::RRRRRR:::::R E:::::::::::::::E P::::PPPPPPPPP A:::::A A:::::A
R::::R R:::::R E::::::EEEEEEEEEE P::::P A:::::AAAAAAAAA:::::A
R::::R R:::::R E:::::E P::::P A:::::::::::::::::::::A
R::::R R:::::R E:::::E EEEEEE P::::P A:::::AAAAAAAAAAAAA:::::A
RR:::::R R:::::REE::::::EEEEEEEE:::::EPP::::::PP A:::::A A:::::A
R::::::R R:::::RE::::::::::::::::::::EP::::::::P A:::::A A:::::A
R::::::R R:::::RE::::::::::::::::::::EP::::::::P A:::::A A:::::A
RRRRRRRR RRRRRRREEEEEEEEEEEEEEEEEEEEEEPPPPPPPPPPAAAAAAA AAAAAAA*/
2019-01-24 22:24:05 +01:00
IF OBJECT_ID ( 'SelectListPlatByDate', 'P' ) IS NOT NULL
DROP PROCEDURE SelectListPlatByDate;
2019-01-20 11:46:45 +01:00
GO
2019-01-24 22:24:05 +01:00
CREATE PROCEDURE SelectListPlatByDate
2019-01-20 11:46:45 +01:00
@dateV date
AS
2019-01-24 22:24:05 +01:00
SELECT T_plat.ID_plat, T_plat.P_nom, T_plat.P_img, T_plat.ID_typePlat FROM [dbo].[T_listPlat] RIGHT JOIN T_plat ON T_listPlat.ID_plat=T_Plat.ID_plat WHERE CAST(LP_datePlat AS DATE) = @dateV
2019-01-20 11:46:45 +01:00
RETURN
GO
2019-01-24 22:24:05 +01:00
IF OBJECT_ID ( 'SelectListPlatBetweenTwoDateTime', 'P' ) IS NOT NULL
2019-01-20 11:46:45 +01:00
DROP PROCEDURE SelectRepaBetweenTwoDateTime;
GO
CREATE PROCEDURE SelectRepaBetweenTwoDateTime
@dateStart datetime,
@dateEnd datetime
AS
2019-01-24 22:24:05 +01:00
SELECT T_plat.ID_plat, T_plat.P_nom, T_plat.P_img, T_plat.ID_typePlat FROM [dbo].[T_listPlat] RIGHT JOIN T_plat ON T_listPlat.ID_plat=T_Plat.ID_plat AND LP_datePlat>=@dateStart AND LP_datePlat<@dateEnd;
2019-01-20 11:46:45 +01:00
RETURN
GO
2019-01-20 11:47:27 +01:00
IF OBJECT_ID ( 'ListPlat', 'P' ) IS NOT NULL
DROP PROCEDURE ListPlat;
2019-01-20 11:46:45 +01:00
GO
2019-01-20 11:47:27 +01:00
CREATE PROCEDURE ListPlat
2019-01-20 11:46:45 +01:00
@ID_repa int
AS
2019-01-24 22:24:05 +01:00
SELECT T_plat.ID_plat, T_plat.P_nom, T_plat.P_img, T_plat.ID_typePlat FROM [dbo].[T_listPlat] RIGHT JOIN T_plat ON T_listPlat.ID_repa=@ID_repa;
2019-01-20 11:46:45 +01:00
RETURN
GO