I have 2 questions.
I am trying to write a stored procedure to update a table. I am trying
to pass a variable that represents the name of the column/field and
another for the value that I am changing.
For example:
@FieldName VARCHAR(100)
@FieldValue VARCHAR(100)
AS
UPDATE tblTHETABLE
SET @FieldName = @FieldValue
First is it possible to use a variable as the column/field name? If
so, how do I go about it?
Also, it would be nice if I could have the @FieldName and @FieldValue
variables as arrays. Is that possible?
Thank-you for any assistance
Bill