Hi all. I have an existing table (we'll call it table1)with one column with all null fields. Other columns in table1 have data in them already. I am trying to update the column of nulls with data from another table (table2) which also shares another column in common with table1. I've been trying to do with by running the following SQL query:
UPDATE table1 Set prod_size = (SELECT table2.prod_size FROM table2, table1 WHERE table1.IDnum = table2.IDnum)
This query gives me the following error:
Server: Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
Any suggestions/ideas? Thanks in advance for any help.
Kevin
UPDATE table1 Set prod_size = (SELECT table2.prod_size FROM table2, table1 WHERE table1.IDnum = table2.IDnum)
This query gives me the following error:
Server: Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
Any suggestions/ideas? Thanks in advance for any help.
Kevin