Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8655795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:07:34+00:00 2026-06-12T15:07:34+00:00

Hi Guys I am trying to Update some rows like this : declare cursor

  • 0

Hi Guys I am trying to Update some rows like this :

declare
   cursor c1 is select core_cust_id, ADDRESS_LINE1, ADDRESS_LINE2, ADDRESS_LINE3,CITY_CODE,
   STATE_CODE from crmuser.address where corp_id is not null and 
ADDRESSCATEGORY='Mailing';
   begin
   for i in c1 loop
   update  crmuser.tradefinance set ADDR_1=i.ADDRESS_LINE1,
   ADDR_2=i.ADDRESS_LINE2, ADDR_3=i.ADDRESS_LINE3, CITY_CODE=i.CITY_CODE,
   STATE_CODE=i.STATE_CODE       
   where i.core_cust_id=(select core_cust_id from crmuser.tradefinance where corp_id is not null);
   end loop; 
   end;

i am getting the Error:

ORA-01427: single-row subquery returns more than one row
ORA-06512: at line 7

When I execute

select core_cust_id, ADDRESS_LINE1, ADDRESS_LINE2, ADDRESS_LINE3,CITY_CODE,
   STATE_CODE from crmuser.address where corp_id is not null and 
ADDRESSCATEGORY='Mailing';

I get 485 records with Which I want to Match the Core_cust_id. When I execute:

select core_cust_id from crmuser.tradefinance where corp_id is not null;

I again get the 485 core_cust Ids to Match the other Core_cust_ids in the Loop…Why is my query returning Multiple records? What should I correct? I am Using Oracle 10g

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:07:35+00:00Added an answer on June 12, 2026 at 3:07 pm

    Try this

    declare
       cursor c1 is select core_cust_id, ADDRESS_LINE1, ADDRESS_LINE2, ADDRESS_LINE3,CITY_CODE,
       STATE_CODE from crmuser.address where corp_id is not null and 
    ADDRESSCATEGORY='Mailing';
       begin
       for i in c1 loop
       update  crmuser.tradefinance set ADDR_1=i.ADDRESS_LINE1,
       ADDR_2=i.ADDRESS_LINE2, ADDR_3=i.ADDRESS_LINE3, CITY_CODE=i.CITY_CODE,
       STATE_CODE=i.STATE_CODE       
       where i.core_cust_id=crmuser.tradefinance.core_cust_id 
       and crmuser.corp_id is not null;
       end loop; 
       end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help guys, trying to make this test to pass but with
I'm trying to update all SQL rows in the [Temp_LTGData] table setting the [CORP_REG_NO]
Trying to update some old code from live() to use on() and something is
I'm trying to update the database using the ajax, but getting some error below
Hi guys i am trying to build a jni library. The build is working
Hi Guys i'm trying to let my Screen blink a morse code out using
Hey guys i am trying to automate my system at work for sending artwork
Hi guys I'm trying to integrate the tinymce plugin however I'm running into problems
Hi guys I'm trying the code samples from zend frameworks site on how to
hello guys I am trying to extract all the anchor links from aol but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.