Hi,
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author: RAJKUMAR
-- Create date: 11/05/2016
-- Description:
-- =============================================
ALTER PROCEDURE [dbo].[sp_Update_BasedonONEField]
(
@TableName varchar(50),@Col1 varchar(50),@Col2 varchar(50))
as
declare @Query as nvarchar(255)
set @Query=N'update ' +@TableName+ ' set Periodof_User='''+@Col1+''''+' where File_No='''+@Col2+''''
exec sp_ExecuteSQL @Query
====================================================
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author: RAJKUMAR
-- Create date: 04/02/2015
-- Description:
-- =============================================
ALTER PROCEDURE [dbo].[sp_Update_BasedonTwoFields]
(
@TableName varchar(50),@Col1 varchar(50),@Col2 varchar(50),@Col3 varchar(50))
as
declare @Query as nvarchar(255)
set @Query=N'update ' +@TableName+ ' set Fileby='''+@Col1+''''+', Fileby1='''+@Col2+''''+' where File_No='''+@Col3+''''
exec sp_ExecuteSQL @Query
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author: RAJKUMAR
-- Create date: 11/05/2016
-- Description:
-- =============================================
ALTER PROCEDURE [dbo].[sp_Update_BasedonONEField]
(
@TableName varchar(50),@Col1 varchar(50),@Col2 varchar(50))
as
declare @Query as nvarchar(255)
set @Query=N'update ' +@TableName+ ' set Periodof_User='''+@Col1+''''+' where File_No='''+@Col2+''''
exec sp_ExecuteSQL @Query
====================================================
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author: RAJKUMAR
-- Create date: 04/02/2015
-- Description:
-- =============================================
ALTER PROCEDURE [dbo].[sp_Update_BasedonTwoFields]
(
@TableName varchar(50),@Col1 varchar(50),@Col2 varchar(50),@Col3 varchar(50))
as
declare @Query as nvarchar(255)
set @Query=N'update ' +@TableName+ ' set Fileby='''+@Col1+''''+', Fileby1='''+@Col2+''''+' where File_No='''+@Col3+''''
exec sp_ExecuteSQL @Query