• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validating the data using Oracle PL SQL

 
Vinod Vijay
Ranch Hand
Posts: 150
Java Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have written an Oracle PL SQL Function which accepts few IN paramters.

For e.g.

function abc(x IN Varchar2(200))

/

The parameter x accepts the order no. I want to make sure that x contains only order_number(always in numerics only) or order_number plus line_number(Order_Number-Line_Number -> for e.g 11101-1, 11102-34 in format etc separated by '-')

I have read regular expression that is used in javascript to validate the strings at front end but is there anything in Oracle that can be used just like regular expression to put strong validations?

Please advice.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google for pl/sql regular expressions. There are many examples and tutorials on the web.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic