Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

SQL Question

$
0
0
I have multiple tables with an identical column which need to be populated using data a cached table.

Cached table/view MAX006P.VMAX300M_ALL_USERIDS_ALL_COLUMNS

Error:
SQL0811N The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row.

SQL:

UPDATE COLLECT.TCOLECT070_REQUIRED_APPROVER T070
SET (MF_USERID) =
(SELECT T300.MF_USERID
FROM MAX006P.VMAX300M_ALL_USERIDS_ALL_COLUMNS T300
JOIN COLLECT.TCOLECT070_REQUIRED_APPROVER T070
ON LCASE(T300.LDAP_EMAIL) = LCASE(T070.NOTIFYEE_EMAIL))
WHERE T070.MF_USERID = ''

My work around was to use a shell program to the updates one at a time since the result tables pulls back over 8 thousand rows.

However, I wanted to know if this could be fixed using SQL

Viewing all articles
Browse latest Browse all 13329

Trending Articles