DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: ora-1047

  1. #1
    Join Date
    Apr 2007
    Posts
    31

    ora-1047

    Any ideas why I would be getting an ora-1047 for the following sql code? It works updating single records via pl/sql block cursor, but a bulk update fails with the error even though there is no null columns being selected and the sub-select returns records properly. Solaris 8, Oracle 9.2.0.8 CPU 4/2007.

    Example #1 (Works):
    declare
    cursor c1 is
    select CSARF, trng_title
    from f_trng_test1
    where load_audit_fk = 4000
    and RCRD_ACTN = 'C';
    r1 c1%rowtype;
    begin
    open c1;
    loop
    fetch c1 into r1;
    exit when c1%notfound;
    update f_trng_test set csarf = r1.csarf
    where trng_title = r1.trng_title;
    end loop;
    close c1;
    end;

    Example #2 (ora-1047):
    update f_trng_test ft
    set CSARF =
    (select CSARF
    from f_trng_test1 sft
    where sft.load_audit_fk = 4000
    and sft.trng_title = ft.trng_title
    and sft.RCRD_ACTN = 'C');

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Could you please post whole error stak?

    ORA-1047 just tells you the "above" error happened in that piece of code.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width