Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
[UpdateSavings]
(
@idsite int
)
AS
BEGIN
SET NOCOUNT ON;
UPDATE pz
SET Project_id = 1
FROM ((((pt_Site as s
inner join pt_ProjectsSites as ps on s.IDSite = ps.Site_id)
inner join pt_Projects as p on ps.Project_id = p.IDProjects)
inner join pt_ProjectSavings as pz on p.IDProjects = pz.Project_id)
inner join pt_Personnel as l on p.Personnel_id = l.IDPersonnel)
WHERE IDSite = @idsite
===================================================================================
======================
===================================================================================
=====================
BEGIN TRY
BEGIN TRANSACTION;
/*==========================UPDATE========================================*/
/*==========================FIN UPDATE========================================*/
/*==========================AUDITORIA========================================*/
/*==========================FIN AUDITORIA========================================*/
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
-- Rollback any active or uncommittable transactions before
-- inserting information in the ErrorLog
IF @@TRANCOUNT > 0
BEGIN
ROLLBACK TRANSACTION;
END
EXECUTE [dbo].[uspLogError];
END CATCH;
END;
GO
===================================================================================
======================================
-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE HumanResources.uspGetEmployeesTest
-- Add the parameters for the stored procedure here
@LastName nvarchar(50),
@FirstName nvarchar(50)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;