Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA 01427 - Single Row Subquery return More than one Row

Cac47Nov 24 2009 — edited Nov 24 2009
Dear Gurus,

I'm facing an SQL issue that 's freezing me because I just heistate between strat Creainga Procedure to Store all records into a Temp table until find the bad record and then get me into more procedures

So
Can You please help me how to concatenate the result of 1 ID's when they have 2 or more results ?

The Issue, there are some "ROW_ID" by one speciall reason, "Or because they are "VIP", or they are priviliged ID, bref they have 2 Mail Adress
But they all belong to the same "ROW_ID"
.. "mail_forward_address" /* THIS IS THE MULTIPLE ROW SUBQUERY */

If someone face this Error ORA 01427 - Can he advice me what to do ? Can we bypass with a "Case .. When ... End case" in the Sql Statement?
What steps did you use to Work with This? Knowing this view returns 200.000 Records before it reak with the Error Message.
I know is not easy,

Anyway,
Thxs in Advance




select
c.ROW_ID PK_CONTACTID ,
c.FST_NAME c_first_name ,
decode(c.X_MAIL_DEST, 'Account', c.EMAIL_ADDR, 'Home', c.X_WORK_EMAIL_ADDR, '') c_preferred_email,
org.NAME account_name ,
c.LAST_NAME c_last_name ,
replace(c.X_JOB_TITLE,chr(13),'') c_job_title ,
c.INTEGRATION_ID c_integration_id ,
c.BIRTH_DT c_birth_date ,
c.X_WORK_CELL_PH_NUM work_cellular_phone ,
c.X_WORK_FAX_NUM work_fax ,
replace(cad.ADDR,chr(13),'') work_address ,
zc.COUNTRY work_country ,
ind.NAME account_industry ,
(select
CHRCTR_VAL
from
siebel.S_CON_CHRCTR c_cat,
siebel.S_CHRCTR cat
where
c_cat.chrctr_id = cat.row_id and
cat.name = 'Mail Forwarding Address'
and c.ROW_ID = c_cat.contact_id) mail_forward_address /* THIS IS THE MULTIPLE ROW SUBQUERY */
from
SIEBEL.S_INDUST ind ,
SIEBEL.S_ZIPCODE zc ,
SIEBEL.S_ADDR_ORG cad ,
SIEBEL.S_ORG_EXT org ,
SIEBEL.S_CONTACT c
where
c.PR_DEPT_OU_ID = org.ROW_ID (+) and
org.PR_ADDR_ID = cad.ROW_ID (+) and
cad.X_CTRY_CODE = zc.ROW_ID (+) and
org.PR_INDUST_ID = ind.ROW_ID (+) and
c.INTEGRATION_ID IS NOT NULL;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2009
Added on Nov 24 2009
13 comments
1,625 views