Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    53

    Unanswered: insert statement in pl/sql

    guys i'm doing an insert into a table statement inside a pl/sql cursor loop. but it doesnt insert, but did not give any error as well. can some one help? here's my code:

    Cursor ....
    Loop

    insert into table_name (a,b,c)
    values (value1, value2, value3);

    End loop;
    ....
    ...

  2. #2
    Join Date
    Jan 2004
    Location
    India
    Posts
    191
    Please post full code.
    May be ur missing commit out side loop

    Thanks,
    Parag
    Pagnint
    (No need to search web before posting new question)

  3. #3
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    89

    Re: insert statement in pl/sql

    Originally posted by Daven81
    guys i'm doing an insert into a table statement inside a pl/sql cursor loop. but it doesnt insert, but did not give any error as well. can some one help? here's my code:

    Cursor ....
    Loop

    insert into table_name (a,b,c)
    values (value1, value2, value3);

    End loop;
    ....
    ...
    Hi,

    Place your insert statement between Begin ... End block and handle exception "when others". print the sqlerrm and find if any error has faced at the time of insert. After the end loop, check out if there is commit statement.

    Thanx

    Praveen
    (praveenpr@rediffmail.com)
    Thanks and Regards,

    Praveen Pulikunnu

Posting Permissions

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