Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2010
    Posts
    5

    Unanswered: Exception Handling

    is it possible to do exception handling without the need for PL?

    Ben

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    What language/environment are you developing in?

  3. #3
    Join Date
    Feb 2010
    Posts
    5
    hi thanks for your response

    i am using Oracle SQL Developer 1.5.4 of thats any help?

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    OK, I use SQL Developer too (sometimes). If I do something that raises an exception like this:

    Code:
    insert into emp (empno) values ('x') -- empno is a numeric column
    then SQL Developer shows an error in the "Statement Output" pane:

    Error starting at line 1 in command:
    insert into emp (empno) values ('x')
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    If you want something different to happen then, yes, you need to write PL/SQL.

  5. #5
    Join Date
    Feb 2010
    Posts
    5
    right, i get you...i basically want it to carry on with the code and pick up the fall out after. So if it shows an oracle error such as 'got number when expected month' (i think it's that) then it puts them to one side and continues...never done an exception handler before so PL/SQL it is then...cheers

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    With V10+ Oracle you can do DML with ERROR LOGGING & continue processing "good rows"

    INSERT
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  7. #7
    Join Date
    Feb 2010
    Posts
    5
    nice one. i'll give it a go. thanks for your help

Posting Permissions

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