SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Feb 2001
    Location
    USA
    Posts
    776
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to verify string exists in long Sentence

    Here is my Sentence:

    Crtical Error:There was an error uploading the file. File Validation Error: Dial code: "9193" is listed in 2 different locations.Error: [Macromedia][Oracle JDBC Driver][Oracle]ORA-20001: tablenameError Message: ORA-20001: File Validation Error: Dial code: "9193" is listed in 2 different locations.ORA-06512: at "tablename", line 1269 ORA-20001: File Validation Error: Dial code: "9193" is listed in 2 different locations. ORA-06512: at line 1

    I need to verify:
    Dial code: "9193" is listed in 2 different locations

    Thanks,
    Thanks,
    Prashant Patel

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: How to verify string exists in long Sentence

    Why dont you use Instr() function for this.

  3. #3
    Senior Member
    Join Date
    Feb 2001
    Location
    USA
    Posts
    776
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to verify string exists in long Sentence

    I tried but it fails where 9193 is. It works if I search for Dial code:
    Thanks,
    Prashant Patel

  4. #4
    Senior Member
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    529
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to verify string exists in long Sentence

    It probaby fails due to there being quotation marks around the 9193. You have to compensate for those:

    Try putting an extra " beside each one and trying again.
    I'm not a complete idiot - some parts are missing.

  5. #5
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: How to verify string exists in long Sentence

    Otherwise use RegExp to verfiy it in a format of a regular expression.

  6. #6
    Senior Member
    Join Date
    Feb 2001
    Location
    USA
    Posts
    776
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to verify string exists in long Sentence

    Hi MoTest,

    You are absolutely correct. Thanks.
    However, how do I know the entire string [Dial code: "9193" is listed in 2 different locations] is exist or not. I think instr just looks for [Dial] rather than entire string.
    Thanks,
    Prashant Patel

  7. #7
    Senior Member
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    529
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to verify string exists in long Sentence

    Try changing the last character of the string you are searching for - [Dial code: "9193" is listed in 2 different locationd] (Note the d instead of s on the locationd) try inserting this into your instr function and see if you get a return value of 0.

    If you do then it is searching for the entire string.
    I'm not a complete idiot - some parts are missing.

  8. #8
    Senior Member
    Join Date
    Feb 2001
    Location
    USA
    Posts
    776
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to verify string exists in long Sentence

    Hi MoTest,

    It does not look for the entire string. I have implemented what Tarun suggested and it is working fine, meaning it looks for entire string.

    Thank you so much for your help.
    Thanks,
    Prashant Patel

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:25 AM.

Copyright BetaSoft Inc.