-- ============================================= -- Author: -- Create date: -- Description: -- ============================================= -- [C6Mart].[PL_S95ProfiloDiRischio] 'F','BBBPSN44E20B041U' CREATE procedure [C6Mart].[PL_S95ProfiloDiRischio] -- Add the parameters for the stored procedure here @Rete char(1), @CodiceFiscale varchar(16) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @varBF DECIMAL(12,2) DECLARE @coperturaBF DECIMAL(12,2) DECLARE @codiceProfilo SMALLINT DECLARE @dataProfilo DATETIME DECLARE @varProfilo DECIMAL(5,2) DECLARE @nomeProfilo VARCHAR(50) DECLARE @riskclass VARCHAR(50) DECLARE @experience SMALLINT SELECT @codiceProfilo = M.PROFILO_ASS, @dataProfilo = M.DATA_INIZIO_VAL, @varProfilo = CR.MAX_VAR, @nomeProfilo = ProfiliDiRischio.NOMEPROFILO, @riskclass = m.riskclass, @experience = m.experience FROM C6Mart.MIFID AS M INNER JOIN C6Mart.CODIFICA_RISCHIO AS CR ON M.PROFILO_ASS = CR.PROFILO INNER JOIN DBO.ProfiliDiRischio AS ProfiliDiRischio ON M.PROFILO_ASS = ProfiliDiRischio.CODICEPROFILO WHERE M.RETE = @Rete AND M.COD_FISCALE = @CodiceFiscale SELECT @codiceProfilo as codiceProfilo, DBO.TOSHORTDATESTRING (@dataProfilo) as dataInizioValidita, @varProfilo as varMassimo, ISNULL(@varBF,0) as varBF, ISNULL(@coperturaBF,0) as coperturaBF, @nomeProfilo as nomeProfilo, @riskclass as riskClass, @experience as experince END