HI,
In my application I am sending string to sqlserver for the columns to update.but the proceduare will substitute the value for the column.
for ex like below.
I am sending string with column name and the varibale to refer in sqlserver for value(@columnstoupdate) And I want the values to be substitued when I execute that string. can anybody help me out in this.
declare
@columnstoupdate as nvarchar(max),
@neworiginalfacevalue as decimal(18,2),
@newcurrentfacevalue as decimal(18,2)
set @newcurrentfacevalue=2
set @neworiginalfacevalue=3
set @columnstoupdate='originalFace=@neworiginalfacevalue and CurrentFace=@newcurrentfacevalue'
set @strsql='update positions set '+@columnstoupdate
In my application I am sending string to sqlserver for the columns to update.but the proceduare will substitute the value for the column.
for ex like below.
I am sending string with column name and the varibale to refer in sqlserver for value(@columnstoupdate) And I want the values to be substitued when I execute that string. can anybody help me out in this.
declare
@columnstoupdate as nvarchar(max),
@neworiginalfacevalue as decimal(18,2),
@newcurrentfacevalue as decimal(18,2)
set @newcurrentfacevalue=2
set @neworiginalfacevalue=3
set @columnstoupdate='originalFace=@neworiginalfacevalue and CurrentFace=@newcurrentfacevalue'
set @strsql='update positions set '+@columnstoupdate