Hey all, I'm sure the answer to this is obvious AND simple, but I just can't get it!
I have a row in a database that contains a varchar(50) column and a TEXT column. I want to copy the values of these two columns to another row, withing a stored procedure.
Keeping in mind that text can not be used as a local variable, how can I do this?
I've tried:
UPDATE tasks_tbl set tasks_tbl.copy = tblSourceTask.Copy,
tasks_tbl.Heading = tblSourceTask.Heading
FROM tasks_tbl, tasks_tbl as tblSourceTask
WHERE tasks_tbl.taskid = @destinationTaskID
AND tblSourceTask.TaskID = @sourceTaskID
...but I just can't get anyware!
I have a row in a database that contains a varchar(50) column and a TEXT column. I want to copy the values of these two columns to another row, withing a stored procedure.
Keeping in mind that text can not be used as a local variable, how can I do this?
I've tried:
UPDATE tasks_tbl set tasks_tbl.copy = tblSourceTask.Copy,
tasks_tbl.Heading = tblSourceTask.Heading
FROM tasks_tbl, tasks_tbl as tblSourceTask
WHERE tasks_tbl.taskid = @destinationTaskID
AND tblSourceTask.TaskID = @sourceTaskID
...but I just can't get anyware!