Problem with UPDATE
Date: Wed, 20 Apr 1994 19:41:32 GMT
Message-ID: <1994Apr20.194132.22568_at_ornl.gov>
This will probably turn out to be something really stupid and I'll be terribly embarrassed about having asked it, but here goes . . .
I'm having problems with the UPDATE command. This is what I'm getting:
SQL> update data_dict set units =
2 (select units from old_data_dict x where
3 table_name = x.table_name and
4 column_name = x.column_name);
(select units from old_data_dict x where
*
ERROR at line 2:
ORA-01427: single-row subquery returns more than one row
I know that there is only a single row in table "x" with the same table_name and column_name as each row in the original table. I also know that I can rewrite the code in PL/SQL and get it to work, but I'd prefer to find out what I'm doing wrong here.
Any suggestions would be greatly appreciated.
Thanks.
Beverly
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Received on Wed Apr 20 1994 - 21:41:32 CEST
+ + +
+ Beverly Cather Zygmunt + Phone: (615) 574-1007 +
+ Oak Ridge National Laboratory + email: zygmuntbc_at_ornl.gov +
+ Building 4500N, MS 6274 + bzy_at_ornl.gov +
+ Oak Ridge, TN 37831-6274 + +
+ + +
+ + +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ +
+ "If you torture your data long enough, they will tell you what +
+ you want to hear." -- James L. Mills +
+ +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++