Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

SQL Script

SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.test
AS
BEGIN
  declare @filexls varchar(max)
 -- MERGE Products AS TARGET
 -- USING UpdatedProducts AS SOURCE
 -- ON (TARGET.ProductID = SOURCE.ProductID)
 -- WHEN MATCHED AND TARGET.ProductName <> SOURCE.ProductName
 --OR TARGET.Rate <> SOURCE.Rate THEN
 --UPDATE SET TARGET.ProductName = SOURCE.ProductName,
 --TARGET.Rate = SOURCE.Rate
 -- WHEN NOT MATCHED BY TARGET THEN
 -- INSERT (ProductID, ProductName, Rate)
 -- VALUES (SOURCE.ProductID, SOURCE.ProductName, SOURCE.Rate)
 -- WHEN NOT MATCHED BY SOURCE THEN
 -- DELETE
 -- OUTPUT $action,
 --DELETED.ProductID AS TargetProductID,
 --DELETED.ProductName AS TargetProductName,
 --DELETED.Rate AS TargetRate,
 --INSERTED.ProductID AS SourceProductID,
 --INSERTED.ProductName AS SourceProductName,
 --INSERTED.Rate AS SourceRate;
 --SELECT @@ROWCOUNT;
 
END
GO

Depends On

No items found

Used By

No items found