Ascalonian
Programmer
I have two tables (table_one, table_two). These are mirror tables, so they contain the same columns.
I am trying to work with two columns: key_code and proposal_text. Both tables have the same values in key_code but table_two has all NULLs in proposal_text.
So I am tasked with moving the proposal_text from table_one into table_two by means of matching the key_codes. (Essentially someone erased the data out of table_two and need to repopulate it from table_one).
So I wrote the following update statement:
Looks fine, but I get the following error:
SQL Server Database Error: The text, ntext, and image data types are invalid in this subquery or aggregate expression.
Any ideas? Thank you.
I am trying to work with two columns: key_code and proposal_text. Both tables have the same values in key_code but table_two has all NULLs in proposal_text.
So I am tasked with moving the proposal_text from table_one into table_two by means of matching the key_codes. (Essentially someone erased the data out of table_two and need to repopulate it from table_one).
So I wrote the following update statement:
Code:
update table_two
set proposal_text = (SELECT proposal_text
FROM table_one tOne
WHERE tOne.key_code = key_code)
Looks fine, but I get the following error:
SQL Server Database Error: The text, ntext, and image data types are invalid in this subquery or aggregate expression.
Any ideas? Thank you.