49 lines
No EOL
1.3 KiB
Transact-SQL
49 lines
No EOL
1.3 KiB
Transact-SQL
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
|
|
IF OBJECT_ID('[dbo].[sp_GetTanulokJelenletiIvAlkalmankent]') IS NOT NULL
|
|
BEGIN
|
|
DROP PROCEDURE [dbo].[sp_GetTanulokJelenletiIvAlkalmankent]
|
|
END
|
|
GO
|
|
|
|
-- =============================================
|
|
-- Author: Dőrr Tamás
|
|
-- Create date: 2015.12.15.
|
|
-- Description: sp_GetTanulokJelenletiIvAlkalmankent
|
|
-- =============================================
|
|
CREATE PROCEDURE [dbo].[sp_GetTanulokJelenletiIvAlkalmankent]
|
|
@foglalkozasId int,
|
|
@tanevId int
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON;
|
|
|
|
select
|
|
fog.c_nev Foglalkozas
|
|
,t.c_nev Tantargy
|
|
, f.c_nyomtatasinev Tanar
|
|
, i.c_nev Intezmeny
|
|
, i.C_VAROS Varos
|
|
from T_FOGLALKOZAS_OSSZES fog
|
|
inner join t_foglalkozasok_tanarok ft on ft.C_FOGLALKOZASOKID=fog.id
|
|
inner join T_FELHASZNALO_OSSZES f on f.id=ft.C_TANAROKID
|
|
inner join T_INTEZMENYADATOK_OSSZES i on i.id=fog.c_intezmenyid
|
|
inner join T_TANTARGY_OSSZES t on t.id=fog.C_TANTARGYID
|
|
where fog.id=@foglalkozasId
|
|
|
|
select
|
|
C_OKTATASIAZONOSITO OktAzon,
|
|
C_NYOMTATASINEV NEV
|
|
from t_felhasznalo_osszes f
|
|
inner join t_tanulocsoport_osszes tcs on f.id=tcs.c_tanuloid
|
|
inner join t_osztalycsoport_osszes ocs on ocs.id=tcs.C_OSZTALYCSOPORTID
|
|
inner join T_FOGLALKOZAS_OSSZES fog on fog.C_OSZTALYCSOPORTID=ocs.id
|
|
where
|
|
fog.id=@foglalkozasId
|
|
and TCS.TOROLT='F'
|
|
|
|
END |