
January 10th, 2012, 09:24 AM
|
 |
Contributing User
|
|
Join Date: Mar 2008
Location: Texas
Posts: 350
 
Time spent in forums: 3 Days 14 h 45 m 42 sec
Reputation Power: 6
|
|
|
Single-row subquery returns more than one row
I can't seem to wrap my head around this problem I'm having with a query. I need to update all rows in my ps_ntsr_gf_stufile tables with the concatenated values from the ps_classes_tbl table where a.CLASS_NBR = b.CLASS_NBR. I tried to limit it to emplid from the ps_stdnt_enrl table but no luck.
PHP Code:
UPDATE ps_ntsr_gf_stufile a
SET a.CLASS_NAME = (SELECT CONCAT('SUBJECT', 'CATALOG_NBR')
FROM PS_CLASS_TBL b
WHERE a.CLASS_NBR = b.CLASS_NBR
AND a.STRM = '1118'
AND a.INSTITUTION = 'NT752')
WHERE a.EMPLID IN (SELECT distinct EMPLID FROM PS_STDNT_ENRL);
I'm still getting the ORA-01427 error.
|