I am trying to do:
update existingTable
set code = @declaredTable.code
where id = @declaredTable.id
but when I do this I get the error:
Must declare the scalar variable "@declaredTable"
twice.
How do I update values of an existing tables to values from a declared tables?
Why doesn't this work?
Any help would be much appreciated!