
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE stp_get_cursos_usuario 
	-- Add the parameters for the stored procedure here	
	@vchUsuario varchar(200)
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 
		CL.intCursoId, 
		CL.vchTitulo, 
		CL.vchDescripcionCorta, 
		CL.vchDescripcion, 
		CL.decCosto, 
		CL.decIva, 
		CL.decCostoTotal, 
		CL.datFalta, 
		CL.bitActivo
	From 
		UserQC.tbl_rel_Cursos_Usuario US
	Inner Join
		UserQC.tbl_det_Cursos CL
		ON US.intCursoId = CL.intCursoId
	WHERE 
		US.vchUsuario = @vchUsuario
	
END
GO
