PDC_REPORT_CreazioneDB/sql/Collaudo/procedure/C6MartPeriodico_GetRiskArea.sql
2025-06-10 15:29:00 +02:00

20 lines
483 B
SQL

--[C6MartPeriodico].[GetRiskArea] 'S', 'GLLRFL52L02L219D'
CREATE procedure [C6MartPeriodico].[GetRiskArea]
-- Add the parameters for the stored procedure here
@Rete char(1),
@CodiceFiscale varchar(16)
AS
BEGIN
select
case
when b.profilo is null then -1
else b.profilo
end as profiloCode
FROM
C6MartPeriodico.mifid a
left outer join C6MartPeriodico.CODIFICA_RISCHIO b
on A.PROFILO_ASS=B.PROFILO
WHERE
a.COD_FISCALE = @CodiceFiscale
and a.RETE= @Rete
END