Validate email address pre-Oracle 10g

I want the result to be like the following, but for Oracle 9:
SELECT  email_address   
FROM    mytable
WHERE   REGEXP_LIKE (email_address, '[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}');I found a website that said the following...
In pre-Oracle10g versions of Oracle, in order to get this type of equality of characters you needed to use a combination of the NLS_UPPER and NLS_LOWER functions or use the NLS_SORT setting of GENERIC_BASELETTER. While these approaches worked they do have the flaw of having to programmatically code the NLS_UPPER or NLS_LOWER functions into every select statement. Or when using the GENERIC_BASELETTER you had a solution that was not a true linguistic solution for character comparison.
http://www.databasejournal.com/features/oracle/article.php/3494646
...but I don't exactly know how to use those commands. Could anyone lend me a helping hand?

Thank you Justin for your reply. So in the query I would call a wrapper function which I would write to go on the server that would feed the owa_pattern_match package, my string and pattern to match. In the wrapper function I would get the boolean value, and convert it to a number or varchar2 (since the database does not support boolean data types?), like 'Y' for TRUE, and that would be the return value of the wrapper function. Do I have this right?
Why can't I just directly reference the built in package?

Similar Messages

  • How to validate Email Address in HTML DB Application

    Hi,
    I have delevoped one Employee Login Details form in HTML DB. But i am unable to validate that email address as i find html db is not supporting String functions like indexOf(char c), substring(int) ect. So please can anybody help me to know how to validate email address that it has @ and . symbol or not.
    Thanks in advance.

    user529382,
    You may be able to use Regular Expressions instead, if you do a search in this forum for 'regex' you should find a few hits.
    While I agree that using a regular expression is a great way to verify that the user has entered an email address that conforms to the regular expression rules, it is still nothing more than that....conforming to the regular express rules.
    The only way to 100% confirm that an email address is 'valid', is to actually send an email to it, so what I tend to do is to get the user to enter their email twice (in a user registration screen for example), that way you can minimize the chance of 'typos', then send out a 'verification email' that the user has to click a link on to verify they have received it (I'm sure you've seen this type of system before), only when the confirmation is received would I then make the account 'active'.
    Hope this helps.

  • Validate email address with regex

    All,
    I am trying to split and validate one/multiple email addresses like below. Ive got the split based on delimiter(, ) to work well but i cant get the validation to work using oracle REGEX
    examples:
    1.  "[email protected], [email protected], [email protected], [email protected],"
    2.  "[email protected]"
    3.  "[email protected],"
    So how can i validate the emails as described above?
    using oracle 11g rel.2
    thanks in advance...regards.

    Hi,
    Gor_Mahia wrote:
    All,
    I am trying to split and validate one/multiple email addresses like below. Ive got the split based on delimiter(, ) to work well but i cant get the validation to work using oracle REGEX
    examples:
    1.  "[email protected], [email protected], [email protected], [email protected],"
    2.  "[email protected]"
    3.  "[email protected],"
    So how can i validate the emails as described above?
    using oracle 11g rel.2
    thanks in advance...regards.
    You haven't described what you want.
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002
    Do you want an expression that tells whether a string is a valid e-mail address or not?  You might start by looking to see if the string is divided into 3 parts by an @ sign, and then by a dot, with at least 1 letter in each of the 3 parts. Here's one way to do that:
    REGEXP_LIKE ( email_addr
                , '[[:alpha:]].*@.*[[:alpha:]].*\..*[[:alpha:]]'
    If the expression above returns FALSE, you can be sure that that string is not a valid email address.

  • Broken email address for Oracle By Example!

    Hello,
    The web site at http://otn.oracle.com/obe/paa/index.html has "If you have questions or comments, please send an email to [email protected]"
    When I wrote to this email address mail bounced back.
    Ganesh

    Hi Ganesh,
    Apologies for the delay in responding to you.
    Please note the the location you mentioned is not a part of the OTN documentation pages which are located at:
    http://otn.oracle.com/documentation/content.html
    Please try the Memeber feedback forum at: Community Feedback (No Product Questions)
    Thanks and regards,
    Les

  • Validate email address

    hi i have situation where i have to confirm email address,if the confirm email is diffirent from the email address i must raise error meesage immediatley ,am in jdeveloper 11.1.1.6.0

    hi i did that i what to check if the confirm email is not diffirent from the email entered can check if the email is valid,if the confirm email is diffirent form the email entered i must get error message saying the email is not the same
    i try this
    this is the email am entering
    <af:inputText value="#{bindings.Organisationemail.inputValue}"
                                                                   simple="true"
                                                                   columns="20"
                                                                   maximumLength="#{bindings.Organisationemail.hints.precision}"
                                                                   shortDesc="#{bindings.Organisationemail.hints.tooltip}"
                                                                   id="it26"
                                                                   required="true"
                                                                   validator="#{pageFlowScope.orgvalidation.checkEamail}"
                                                                   label="Email Address"
                                                                   autoSubmit="true">
                          <f:validator binding="#{bindings.Organisationemail.validator}"/>
                          <af:validateRegExp pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}"
                                             messageDetailNoMatch="The value provided is not a valid email address"/>
                        </af:inputText>
    when i enter this confirm email i what to validate that is the same as the email entered above
    <af:inputText value="#{bindings.ConfirmEmail.inputValue}"
                                                     simple="true"
                                                     columns="20"
                                                     maximumLength="#{bindings.ConfirmEmail.hints.precision}"
                                                     shortDesc="#{bindings.ConfirmEmail.hints.tooltip}"
                                                     id="it65" autoSubmit="true"
                                                     required="true"
                                                     label="Confirm Email"
                                                     validator="#{pageFlowScope.orgvalidation.checkEamailTest}">
                          <f:validator binding="#{bindings.ConfirmEmail.validator}"/>
                          <af:validateRegExp pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}"
                                             messageDetailNoMatch="The value provided is not a valid email address"/>
                        </af:inputText>
    public void checkEamail(FacesContext facesContext, UIComponent uIComponent,
    Object object) {
    // Add event code here...
    //OperationBinding op = ADFUtils.findOperation("findbyEmail");
    String value =(String)object;
    String evalue= checkOrgEmail(value);
    if( evalue == null){
    }else{
    FacesMessage message = new FacesMessage();
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    message.setSummary("Email already exists.");
    message.setDetail("Email already exists.");
    FacesContext context =  FacesContext.getCurrentInstance();
    context.addMessage("esecurity", message);
    throw new ValidatorException(message);
    //  showFacesInformationMessage("Email already exists");
    public void checkEamailTest(FacesContext facesContext, UIComponent uIComponent,
    Object object) {
    // Add event code here...
    //OperationBinding op = ADFUtils.findOperation("findbyEmail");
    chkEmail();
    String value =(String)object;
    String evalue= checkOrgEmail(value);
    if( evalue == null){
    }else{
    FacesMessage message = new FacesMessage();
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    message.setSummary("Email already exists.");
    message.setDetail("Email already exists.");
    FacesContext context =  FacesContext.getCurrentInstance();
    context.addMessage("esecurity", message);
    throw new ValidatorException(message);
    //  showFacesInformationMessage("Email already exists");
    public String Confirmemail(){
    String confirmemail = null;
    DCIteratorBinding it0 = ADFUtils.findIterator("UamOrganisationsView1Iterator1");
    RowSetIterator rsi = it0.getRowSetIterator();
    Row r = rsi.getCurrentRow();
    confirmemail = (String)r.getAttribute("ConfirmEmail");
    return confirmemail;
    public String email(){
    String email = null;
    DCIteratorBinding it0 = ADFUtils.findIterator("UamOrganisationsView1Iterator1");
    RowSetIterator rsi = it0.getRowSetIterator();
    Row r = rsi.getCurrentRow();
    email = (String)r.getAttribute("Organisationemail");
    return email;
    public void chkEmail(){
    if (this.Confirmemail() != this.email()){
    FacesMessage message = new FacesMessage();
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    message.setSummary("Confirm email is not the same as emaill address entered");
    //message.setDetail("At least one accounting officer is required.");
    FacesContext context =  FacesContext.getCurrentInstance();
    context.addMessage("esecurity", message);
    throw new ValidatorException(message);
    public String checkOrgEmail(String email){
    ResultSet rs;
    Row curPerson;
    String value= null;
    OrgAppModuleImpl am =(OrgAppModuleImpl)ADFUtils.getApplicationModuleForDataControl("OrgAppModuleDataControl");
    try {
    value =am.findbyEmail(email.toUpperCase().trim());
    // ADFUtils.ReleaseApplicationModule(am);
    catch (Exception e) {
    //ADFUtils.ReleaseApplicationModule(am);
    e.printStackTrace();
    return value;
    the problem is am always geting therr even if i have entered same email

  • Validate Email Address on ChangeOwnData iView

    All,
    We would like to have the ESS changeowndata iView validate the email address so that the user is unable to enter an invalid value when changing their address.   From the searching I have done, it does not appear that ESS delivers a valid BADI to check the value and produce an error message. 
    Basically, when they are on step 2 of the roadmap (EDIT), they should not be able to navigate to step 3 (REVIEW AND SAVE) if the value they entered is invalid.
    We are on ECC6 with EP7.
    Am I missing something?
    Brian Snyder

    Hi Brian,
    Most of the time i have found that if you are enhancing the RFC and passing the error mesaage to it, it is not handled by portal application and a dump occurs with your error message or in some casesnothing happens at all.
    Seems like you need to do validation in the RFC and modify the webdynpro java application using NWDI track to display error message and stop further navigation.
    Regards
    Vishal kapoor

  • Validate email address and http link

    Could anyone please post procedures for verifying email addresses and http links in PL/SQL?

    What exactly you'd like to validate in email address?

  • Problem in uploading xls/csv file with Email address through oracle forms

    Dear all,
    I've created an interface to upload data from xls
    and csv files to database tables.
    I'm sucessed in this. Now i'm facing an issue.
    If the xls/csv file having Email address,the
    upload activity is not working..junk characters is
    getting stored.
    I came to know that, xls .csv file having email
    address with hiperlink. so this may cause the
    issue (just guessing)..
    we can't restrict users to upload email without
    hiperlink.. so what is the alternative to do
    this..
    Email address
    [email protected]
    [email protected]
    [email protected]
    etc...

    Can you give some more information:
    What versions of Forms, database, Java, browser are you using?
    How are you uploading data? Please show us your code.
    What do you mean by "email with a hyperlink"?

  • Why is AMP still asking me to "validate email address"?

    Every time I open AMP, it asks me to validate my e-mail address.  I do not know what my validation code was and I do not remember ever receiving one, but if I did, I would have kept it and I would have entered it into the appropriate box after receiving it.
    So what now?  You might suggest that I click on, "Resend Validation Code," but you would be wrong because I have doing that multiple times and no e-mail with the validation code comes to my inbox.
    Any idea as to why this just started happening and what I can do to get the validation code or at least eliminate the need for the validation code?
    Thank you,
    edsager

    You cannot use a Gift Card to send a Gift Card (if that is what you are trying to do as per the link HT2736).

  • Problem with Email Notification in Oracle 10g

    Hello Guys,
    I have the following simple stored procedure for notifying emails.The procedure is getting executed successfully, but no email is being sent to mailbox, any help is appreciable.!! I'm very new to write this pl/sql stuff..!!! This is a very Urgent issue, need help ASAP.Thanks
    Source Code:
    CREATE OR REPLACE PROCEDURE Test_mail (sender IN VARCHAR2,
    recipient IN VARCHAR2,
    message IN VARCHAR2)
    IS
    mailhost VARCHAR2(30) := 'mail.sfsu.edu';
    mail_conn utl_smtp.connection;
    BEGIN
    mail_conn := utl_smtp.open_connection(mailhost, 25);
    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, sender);
    utl_smtp.rcpt(mail_conn, recipient);
    utl_smtp.data(mail_conn, message);
    utl_smtp.quit(mail_conn);
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('error');
    END Test_mail;

    Thanks for ur help,
    I got the below msg in command prompt when I fired telnet mailserver 25
    ..could not open connection to host, connection failed.
    So how to sort out this problem?
    How does mailserver 25 points to my smtp server (mail.sfsu.edu)?
    is there any otherway to test? either yahoo or gmail?
    Thanks, looking farward to ur reply, appreciate ur help.

  • Validate an email address

    Hello
    I am using this to validate email addresses and it does not
    seem to work:
    } else if (!email_txt.length ||
    email_txt.indexOf(&quot;@&quot;) == -1 ||
    email_txt.indexOf(&quot;.&quot;) == -1) {
    status_txt.text = &quot;Invalid Email.&quot;;
    I would, in any case, prefer to use the following server
    script for validation purposes:
    &lt;%
    'Email
    re.Pattern = &quot;^\w+@\w+\.\w+&quot;
    If Not re.Test(email) Then
    errorArray(1) = &quot;red&quot;
    ErrorMsg = ErrorMsg &amp;
    &quot;&lt;center&gt;Please type in a valid email
    address&lt;/center&gt;&quot;
    end if
    %&gt;
    If I use this server script, how do I begin to show it in my
    movie, please? What Action Script do I use to 'pull it in' from the
    server and show it?
    Many thanks
    Steve

    Here's an email validation class I use:
    * EmailValidator<br>
    * (c) 2006 blurredistinction, LLC<br>
    * www.blurredistinction.com
    * <p>
    * by Dave Mennenoh<br>
    * [email protected]
    * <p>
    * Allows email addresses to be easily checked for validity
    using current
    verification rules.
    * <p>
    * Usage: var emv:EmailValidator = new
    EmailValidator();<br>
    * var valid = emv.validate("[email protected]");
    class com.blurredistinction.EmailValidator {
    //ranges of valid ASCII values for email addresses
    private var validASCII:Array = [[43, 43], [45, 46], [48,
    57], [61, 61],
    [65, 90], [94, 95], [97, 123], [125, 126]];
    function EmailValidator () {}
    * Checks an email address for validity.
    * @param email Email string to be checked for validity
    * @return Boolean - True if valid
    public function validate (email:String):Boolean {
    //split email into local and domain portions
    var localDom:Array = email.split ("@");
    //there can be only one @ sign - and there has to be one
    //and there must be something before the @
    if ((localDom.length != 2) || (localDom[0].length < 1)) {
    return false;
    //local portion can't start or end with a .
    if ((localDom[0].charAt(0) == ".") || (localDom[0].charAt
    (localDom[0].length - 1) == ".")) {
    return false;
    //split the domain portion into domain name and extension
    var domExtension:Array = localDom[1].split (".");
    //domain must contain at least one .
    if(domExtension.length < 2){
    return false;
    //domain can't start with a .
    if(domExtension[0].length == 0){
    return false;
    //there can be multiple .'s in the domain portion so use the
    last item in
    the array
    //extension length must be between 2 and 4 characters
    if (domExtension[domExtension.length - 1].length < 2 ||
    domExtension[domExtension.length - 1].length > 4) {
    return false;
    //finally check the local portion & domain for invalid
    chars
    if ((!checkString (localDom[0])) || (!checkString
    (localDom[1]))) {
    return false;
    return true;
    //------------------------ PRIVATE
    * Checks each character in the string to see if it's in the
    range of valid
    ascii
    * @param theString String to be validated
    * @return True if each character is in a valid range
    private function checkString (theString:String):Boolean {
    var sl = theString.length;
    var ind:Number;
    for (ind = 0; ind < sl; ind++) {
    if (!isValidASCII (theString.charCodeAt (ind))) {
    return false;
    return true;
    * See if the input character falls in the valid range of
    valid ascii chars
    * @param theChar Single character passed in from
    checkString()
    * @return True if individual char is in a valid range
    private function isValidASCII (theChar:Number):Boolean {
    var ind:Number;
    for (ind = 0; ind < validASCII.length; ind++) {
    if ((theChar >= validASCII[ind][0]) && (theChar
    <= validASCII[ind][1])) {
    return true;
    return false;
    HTH
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • HELP- my blackbery wont receive emails and wont let me validate password or email address

    Hi
    Not sure if in the right forum,but having major problems with my blackberry.I had a message to say i needed to validate email address and password which i did  and keep doing and it just keeps coming up with invalid email address and password and i dont know why because i havent changed anything.I then thought if i deleted email address etc off phone  and try and re add it again it would work but it still doesnt  an still says invalidated. i just dont know what to do because that was the main reason to get a blackberry so i could get my emails.im really annoyed  this has happened. So if anyone could help or have any ideas id so appreciate it.

    Try setting a new password on your email account and then try to re-add it to BIS on your BlackBerry.  If that doesn't work, you can add the email via your PC.  If you tell us what email service you're using (i.e. Yahoo!, GMail, etc.) and who your wireless service provider is we can give you more information.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • How to validate a email address using Validation Pattern?

    Hi,
    is there any document for Validation Pattern? i m looking for a way to validate email addresses in my form.
    it's going to be something like * @ .
    i have no idea of how to do this, or maybe validation pattern is no good? use java script instead?
    any advice is appreciated!
    thanks.

    Hi erv2,
    You just need to place this script in the "exit" event of the field that u r using for email address.
    var r = new RegExp(); // Create a new Regular Expression Object.
        r.compile("^[a-z0-9_\\-\\.]+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,3}$","i");
    if( this.rawValue == null || this.rawValue == "")
    else
    var result = r.test(this.rawValue);                                              
    if (result == true) // If it fits the general form,
         true;               
    else
          xfa.host.messageBox("Please enter a valid email address ");
          this.rawValue = "";
          false;               // fail the validation.
    Thanks
    Amita
    Edited by: amita arora on Jan 20, 2009 10:44 AM

  • Regular expression for email address formats

    I have the following regulare expression which I am using to validate email address format.
    This allows addresses of the form
    [email protected]
    ^[-a-zA-Z0-9._]+\@[-a-zA-Z0-9]+\.[-a-zA-Z0-9]+\.[-a-zA-Z0-9]+$
    And of course this allows addresses of the form
    [email protected]
    ^[-a-zA-Z0-9._]+\@[-a-zA-Z0-9]+\.[-a-zA-Z0-9]+$
    What I'm looking for is something which will allow both.

    This way
    '^[-a-zA-Z0-9._]+\@[-a-zA-Z0-9.]+$' would allow both. :-)
    with test_data as
    ( select '[email protected]' as val from dual union all
      select '[email protected]'   as val from dual union all
      select 'no#good'              as val from dual
    select
      val ,
      case
        when regexp_like( val, '^[-a-zA-Z0-9._]+\@[-a-zA-Z0-9.]+$' ) then 'Y'
        else 'N'
        end
        as good
    from test_data ;
    VAL                  G
    [email protected] Y
    [email protected]   Y
    no#good              NBut then again, it would also allow "[email protected]" and "[email protected]" too. So I suspect you don't really want something that simply allows your two cases to pass validation. If you want to allow only those two cases then try something like this.
    with test_data as
    ( select '[email protected]'     as val from dual union all
      select '[email protected]'       as val from dual union all
      select '[email protected]' as val from dual union all
      select '[email protected]'      as val from dual union all
      select 'no#good'                  as val from dual
    select
      val ,
      case
        when
          regexp_like
          ( val
          , '^[-a-zA-Z0-9._]+\@[-a-zA-Z0-9]+\.[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)?$'
          ) then 'Y'
        else 'N'
        end
        as good
    from test_data ;
    VAL                      G
    [email protected]     Y
    [email protected]       Y
    [email protected] N
    [email protected]      N
    no#good                  N--
    Joe Fuda
    SQL Snippets
    Message was edited by SnippetyJoe - added clarification.

  • EMail Address Validation - Shell Script

    Hi,
    I have a custom concurrent program (Shell Script Program). One of the input parameter is Email address.
    In my code, I need to validate email address format (Ex: [email protected])
    Can anyone paste the code snippet.
    I have tried with the below validation
    case $EMAIL_ID in
         *@?*.?*) echo "Email Address Validated.";;
         *) echo "Invalid Email Address. Please enter the correct format of email address and re-run the program";
    exit 1;;
    esac
    This validation is failing in this scenario xxx,[email protected] / xxx [email protected] (If user enters the email address with comma or a blank space. This validation is returning success message)
    Regards
    BS

    Please look up the syntax for this by typing
    man mailx
    on the shell command prompt.
    Please stop asking Unix specific questions in an Oracle forum. There are more than enough Unix forums on the Internet.
    Please refrain from asking further doc questions here.
    You are in gross violation of the 'Forums Etiquette' post.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • [SOLVED] espeak won't work in crontab

    Espeak works fine from my command line. But I used to use espeak in my crontab to shout at me to take my pills etc etc. However, recently espeak has been generating errors when run by cronie Subject: Cron <robin@bunyip> sudo espeak 'robin take drugs'

  • Password Protecting a Blog

    Hi there, I am trying to create a blog on my new website but I want to password protect it. I read that you can only password protect the entire site, not single pages. I just figured it being a blog there could be some way you could keep some people

  • IE vs FF interpretation of text objects.

    I'm having a problem controlling the column headers when my reports are localized to other languages that translate to longer words vs. their English counterparts.  My included example is in Chinese, and I've also run into the same problem with Russi

  • Download recording from client 120 & upload it into 200

    Hi all. How to download recording from client 120, and upload it into client 200 in the same sap system ? Thanks Krupali

  • How do I View a Rented Movie?

    I rented a movie. It seemed to have downloaded, but I can't find it to play it. Or maybe my question should be, once you rent a movie, how do you view it? It isn't in the movie purchased file, so I am lost. Or the movie is. iMovie does not follow App