catch invalid date value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kannan1983
    New Member
    • Aug 2007
    • 10

    catch invalid date value

    Iam having a column which contains year (e.g 2005,2006), i have to validate each and every value in this column, if it is like(e.g.20005, 20600,200060006 ) i have to caputure this value , for that i have used

    i_date:= to_date (i_year,'yyyy') ;

    here i_date is a DATE datatype , if i_year is like(20005 or 20600) it will thrown an exception number , i used that number to make a user_defined exception and iam capturing that invalid data.
    my problem is if iam having 3 invalid year value , using this method i could able to capture only the first invalid data,becoz once the control go to exception handlig part its wont come to BEGIN block again, IS THERE ANY OTHER METHOD TO SOLVE THIS
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    As you have posted a qustion it articles section it is moved to Oralce forum.

    MODERATOR.

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      yes that is the nature of the Exception block , and its flow is from inner block to outer block.

      You try to write nested begin...end blocks .stilll you can handle only the first exception,becau se execution stops there and coems out of end block.

      Comment

      Working...