CREATE PROCEDURE [dbo].[sp_insertReportPerClienteDati]
@idReport as int,
@idCliente as int,
@utente as varchar(70) = null
AS
declare @rc as int
BEGIN
	SET NOCOUNT ON;
INSERT INTO [dbo].[ReportperClienteDati]
           ([DtCreazione]
           ,[FlgArchiviato]
           ,[IdReport]
           ,[IdCliente]
           ,[Utente])
     VALUES
           (getdate()
           ,0
           ,@idReport
           ,@idCliente
           ,@utente)
--SELECT TOP 1 Identificativo from [ReportperClienteDati] order by DtCreazione desc
SELECT @@identity as Identificativo 
END