Contains only contains one and not - how PLSQL

Hi all

I'm writing a plsql code I need some advice.

How can I optimize contains only - all - contains contains not in PLSQL.

For Ex:

If l_string1 ContainsOnly "ABCDEFGHIJKL" (a set of values)

If l_string2 ContainsAny ' + -/'

If l_string3 ContainsNot "1234567890"

Thank you

Aman

Hello

If you are really determined to do not post sample data, and then publish an issue involving sample data of people who want to help you already, or readily available, such as the tables in the scott schema or HR.

For example, consider the ename column of the table scott.emp, which has these values:

ENAME

----------

ADAMS

ALLEN

BLAKE

CLARK

FORD

JAMES

JONES

KING

MARTIN

MILLER

SCOTT

SMITH

TURNER

WARD

Say you're interested in finding the enames which consist exclusively of letters from the 'A' series of 'n', i.e.:

ENAME

----------

ALLEN

BLAKE

KING

Here are 3 ways to do it.  (I produce these results

ENAME NR L R

---------- -- -- --

ADAMS

ALLEN OK OK OK

BLAKE OK OK OK

CLARK

FORD

JAMES

JONES

OK OK OK KING

MARTIN

MILLER

SCOTT

SMITH

TURNER

WARD

just to test 3-way at the same time and to ensure that they are equivalent.  You might what to use conditions in a WHERE clause, and not a CASE expression.)

This is the query that produced the above results:

SELECT ename

CASE

WHEN NOT REGEXP_LIKE (ename

, '[^A-N]'

)

AND THEN 'OK '.

END AS nr

CASE

WHEN LTRIM (ename

, "ABCDEFGHIJKLMN".

) IS NULL

AND THEN 'OK '.

END as l

CASE

WHEN REGEXP_LIKE (ename

, '^[A-N]+$'

)

AND THEN 'OK '.

END AS r

FROM scott.emp

ORDER BY ename

;

In reply #5, you have shown that you already know how to find what lines that contain all the letters

OTHER THAN « A » ' n '.  To find the containing enames

ONLY ' ' 'N', you can simply use the NOT operator.  In other words, an ename contains ONLY A - N if (and only if) it does not any letter ANOTHER THAT A - N.  This is the approach used in the column above nr.  However, I think that the other ways (column l and r) are better; l is more effective.

Tags: Database

Similar Questions

  • How the identity if one table used only by synonyms and not by any other subprogrammes in a schema?

    Hi people

    How the identity if one table used only by synonyms and not by any other subprogrammes within a schema. I see in the TOAD describe objects tab used by, but I would like to identify hundreds of table so I would like to know if there would be any SQL or Meta Data Tables?

    How the identity if one table used only by synonyms and not by any other subprogrammes within a schema. I see in the TOAD describe objects tab used by, but I would like to identify hundreds of table so I would like to know if there would be any SQL or Meta Data Tables?

    The ALL_DEPENDENCIES view has hierarchical information based on object_id

    The view object has the object_type.

    Create a hierarchical query on the first view and attach it to the second view.

    Or you can use the utldtree.sql file in the installation of the DB admin folder. Comments initially show you how a hierarchical query based on the object type.

  • I accidentally created an email acct, how I remove to the newest one and not the former?

    Entally created an acct email, how do I remove to the newest one and not the former? And I get e just on the other.

    Play the 'e' (email?) to the old account first. You can drag and drop.

    To remove an account from Thunderbird:

    Tools | Account settings| < select the unwanted account > |

    Down at the bottom of the left pane, Account Actions , and then click remove account.

    Both accounts use POP? This could explain why new messages appear in the new account, but not the former.

    It might help to post your Thunderbird settings data: Help. Troubleshooting information. Clear the checkbox "include account names. Click on "Copy text to the Clipboard", then paste (ctrl + v) into your next post here.

  • I teach online and all my classes have the same user name and password. Now that I clicked "remember me next time", I can connect only in one class. How to unlock my password. Carol in English

    I teach online and all my classes have the same user name and password. Now that I clicked "remember me next time", I can connect only in ONE class. How to unlock my login and my password, so that I can use it for all classes. Carol in English

    "Remember Me" for the site connections automatically when you return to the Web site is done with a Cookie the site in Firefox.

    Try to clear your Cookies for this Web site.

    Tools > Options-> life privacy - Cookies = the button show Cookies.

    You must use the custom settings for history at the top of this tab to see the View the Cookies button.

    Enter the domain name in the top search bar and all Cookies for this URL will be displayed. Unless you can figure out which is Cookie to "remember me", you will need to delete them all.

    Hold the {Ctrl} key while you click each Cookie in the small window. When this list is all highlighted, click the Cookie delete button at the bottom left.
    When you are finished click Close.

  • Print only the attachment and not email

    Hello

    Is it possible for me to define the eprint so that it displays only the attachments and not the email too?

    Hello

    I fear the answer is no.

    All content is automatically printed and it cannot be changed.

    You cannot print attached without also printing the email.

    You can find the terms of service listed in the frequently asked questions (FAQ) below:

    http://support.HP.com/us-en/document/c03721293

    Kind regards

    Shlomi

  • When you rename a file highlights only the name and not the name extension.

    Hi all

    When I rename a file, it highlights only the name part of the file name and not the name extension.  I need the name of entire file highlighted when I rename a file.  Where is the setting to change this?

    Thank you

    Pete

    Hi Pete,.

    Engineers also writes a blog on why they made this change, but to prevent millions of calls to support technical questions "I renamed my file and now it no longer opens.
    It might be possible to change this behavior with editing the registry, but I couldn't immediately find a reference to such a value.
    However, I have a workaround.  I usually press F2 to rename a file (I'm a lover of keyboard, hate having to use the mouse).  So I click on F2, then if I need to select both file extension, I can make one of these:
    • Press Ctrl-A
      or
    • Press SHIFT - end
    I generally use the method of shift - end because it's closer where my fingers are already on the keyboard (I'm a lover of keyboard, but I'm too lazy).  Hope this helps at least a little.
  • When I send a page to a Web site to my e-mail address of printers, it displays only the url and not the page

    I have a Photosmart D110 all-in-one and you just bought an Asus Transformer tablet. I downloaded the eprint application and whenever I share a page of a Web site by email to my email address printers that it prints only the URL not the current Web page. Also when I click on the share option it gives me the opportunity to share with the eprint application, but when I do it says it can not read or supports the file due to the size of the paper is not selected.

    Hello

    The HP ePrint does not support pages web impression

    Printing Web pages through email is currently not supported. HP is in the process of developing solutions to support Web page printing for mobile devices.
    

    http://support.HP.com/us-en/document/c03721293

    You can print web pages using the HP ePrint home & Biz using his web browser integrated application:

    http://support.HP.com/us-en/document/c01616126

    Kind regards

    Shlomi

  • EliteDesk 800 G2: SSD will allow only boot UEFI and not appear as a legacy boot option.

    Hello

    My company is the purchase of HP EliteDesk 800 G2, some comes with HARD drive and some with SSDS.

    Deploy us Windows 7 x 64 using SCCM using legacy startup.

    On a machine with installed HARD drive, I can configure the startup options to use legacy boot, but when I replaced the drive to an SSD the only option to start for this drive is UEFI.

    This causes the deployment fails because the player needs to be partitioned as TPG.

    On the other hand, if I disable the legacy, the UEFI boot PXE boot and partition the drive as GPT, after the deployment of a disk image is unable to start with error 0xc000000d (I guess that the cause is supported in Windows 7 because it does not work on Windows 8.1).

    Bottom line, I can install Windows 7 on a HP EliteDesk 800 G2 only if start legacy is enabled and I have partition the drive as UEFI.

    Is it possible to force the SSD at startup like legacy and not UEFI?

    This problem results from the workstation or is it applied by the SSD?

    Thank you.

    Hi Jay,.

    I appreciate you are trying to help.

    I guess that there are some problems of communication because it is a business problem and there are other technical components involved that I don't understand.

    After some research more, it seems that this problem occurs with a specific model of SSD.

    We'll just have to wait for HP support.

    Thank you.

  • I have 2 databases I use Lightroom how to identify objects in one and not the other, I changed

    I use my cell phone as my computer on travel. When I come home, I transfer my data to my main catalog on my desktop. Sometimes, the files remain on my laptop and I made changes to some of my files.

    I was trying to identify objects through finder that I've changed since I added changed files from my laptop to my desktop. My intention was to identify the XMP files that have changed since I added the files from my laptop to my desktop.

    By analyzing what I see in the finder, I find that Lightroom data seem unwise. For example, is as follows the first line in the finder

    File: _MG_1180.xmp

    Date added: 05/05/16

    Creation date: 16/04/16

    Update: 16/04/16

    1. I've been constantly adding to my catalog when I import my SD card in my laptop. I'm waiting for my date added date should be the same as the date of the creation Date. Why date is later than the date of creation?

    2. to play back my 2 libraries, can I just move my files from one to the other xmp?

    Do not do this through xmp. Some elements are never written to .xmp.

    To do this through the sequence of command as follows:

    • On the laptop, in Lightroom, select the photos you want, then use the menu file-> export as catalog command. If the pictures are not on the desktop, check the box that says "negative."
    • Copy all the files created on the desktop
    • On the desktop, use the command file-> import from another catalog and point Lightroom in the laptop just transferred catalog file.

    Which leaves the question of how to identify the photos changed recently. Create a collection of smart with the criterion that the modification Date is greater than YYYY-MM-DD, where of course which is the date of interest.

  • How to remove a user name of unwanted e-mails that appears only with firefox and not with chrome or internet explorer.

    This problem is to go to a Comcast email address wandering through the homepage of Comcast - Comcast records do not appear this username exists anywhere within their system and says it's a firefox issue. The unwanted name appears that when you use firefox to access the homepage of Comcast and drop sign-in window. When you click on the wrong user name, the message indicates the address is not recognized. Bad user name does not appear when the homepage of Comcast is implemented using chrome or internet explore. Would appreciate advice on how to remove this unwanted user name which seems to lie somewhere in the system of firefox. Grateful to all those who would try to help.

    You can use the following steps to delete the recorded data (form) in a drop-down list:

    1. Click on the (empty) input field on the web page to open the drop-down list
    2. Select an entry in the drop-down list with the mouse or the cursor key
      do not click with the mouse or press the Enter key
    3. Press the DELETE key (on a Mac: shift + del) to delete the highlighted entry
  • How can you save only the image and not the whole page?

    We decided to use a tool to manage all media (mediastore), including Adobe illustrator files. Our mediastore display objects as thumbnails (small images) and is able to export in different formats, such as jpg images.

    The problem we have is we see the page through this mediastore, not only the image that we have learned with Amnesty International. So on the tile sometimes we see nothing because the image is small on the page (we see a small black spot on an empty table) and when we send the image (export), receivers had to crop the image to get only the photo...

    Y at - it HAVE any option to save in a format, but with photo only?

    We want to keep th HAVE format, because we want to be able to edit it with AI if we need to change.

    Example of tile:Example_AI_vignette.png

    Is this too much problems to scale the work plan to adapt to the work? When you're in "Modify the work plan" double-click on a group given image automatically dimensionnera the current work plan to adapt to the work.

  • Old product key does not work, he wants just a new... I have not one and not buy a new...

    My computer broke down 2 times... and get very frustrated... now, I have no office, it was ask the product key and I put in what I have, he wants a new... I don't have one. I'm not a geek... I need help please. I have HP a6244n PC, Vista Home Premium. I'll tell you the first time, it crashed, it was because I tried to update from Microsoft and removed my Navidia graphics card, so now I have more than everything. One of my friends has reinstalled a different system? or whatever, I would like to than my vista back... I think he put xp over there...

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Reinstall the appropriate Operationg system provided with your computer.

    Contact the manufacturer of your computer.

    How to get Vista recovery Media and/or to use the Vista recovery Partition on your computer.

    There is no Vista free download legal available.

    http://welcome.HP.com/country/us/en/contact_us.html

    Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.

    Normally, they do this for a cost of $ small.

    In addition, ask them if you have a recovery Partition on your computer/laptop to restore it to factory settings.

    See if a manual provided with the computer or go to the manufacturer's website, email or you can call for information on how to make a recovery.

    Normally, you have to press F10 or F11 at startup to start the recovery process...

    Another way I've seen on some models is press F8 and go to a list of startup options, and launch a recovery of standards of plant with it, by selecting the repair option.

    Ask them if you can also make recovery disk/s for the recovery Partition in case of a system Crash or hard drive failure.

    They will tell you how to do this.

    Every computer manufacturer has their way of doing recovery disk/s.

    Or borrow a good Microsoft Vista DVD (not Dell, HP, etc).
    A good Vista DVD contains all versions of Vista.
    The product key determines which version of Vista is installed.

    There are 2 disks of Vista: one for 32-bit operating system, and one for 64-bit operating system.

    If install a cleaning is required with a good DVD of Vista (not HP, Dell recovery disks):

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu

    http://support.Microsoft.com/default.aspx/KB/918884

    MS advice on the conduct of clean install.

    http://www.theeldergeekvista.com/vista_clean_installation.htm

    A tutorial on the use of a clean install

    http://www.winsupersite.com/showcase/winvista_install_03.asp

    Super Guide Windows Vista Installation

    After installation > go to the website of the manufacturer of your computer/notebook > drivers and downloads Section > key in your model number > get latest Vista drivers for it > download/install them.

    See you soon.

    Mick Murphy - Microsoft partner

  • Print a web page translate several pages when there should only be one page. How to adapt?

    When I try to print a web page, the result is several partial pages. I tried to adjust the scale, but nothing seems to work. Where can I get this type of adjustment?

    Three possible causes.

    1. the page is intended for managers and each frame is print separately. If you right click on the page you will see a menu item for this framework , if this page contains frames. You'll see on this test page.
    http://www.draac.com/framestest.html

    2. a page wide margin setting. You might be able to see that in Page layout > margins/header and footer page, but some printers are able to get weird settings which do not arise here. When you look at: config these prefs are far
    Print.printer_-printer name_Printer.print_margin_left
    and
    Print.printer_-printer name_Printer.print_margin_right

    3. a non standard paper size is defined in the properties for this printer as seen through Firefox. Could define Custom or picture size.

    This section of the support article a hyperlink by SafeBrowser.

    http://KB.mozillazine.org/Problems_printing_web_pages#Prints_to_a_small_portion_of_the_page

    #2 and 3, do a reset should solve. Do the 'reset as described here:


    http://KB.mozillazine.org/Problems_printing_web_pages#Reset_printer

    Make sure that you reset all the preferences for this printer.

  • This parameter is used to display the emails one and not hidden behind as subject

    When I receive an email that covers the same topic... these emails are stacked one behind the other... HOW can they be included as individual emails? VERY difficult to find this way.

    View (Alt - V) - sort by - Unthreaded

  • Split does not at all in my ipad air 2 ios9.2 - I'm only using safari and notes but no white handle appears

    I have an ipad with ios 9.2 air2 and I can't split to work and get a white handle to drag on. I don't have any white handle at all no matter what applications I use same apple installed apps like safari, notes or notes and calendar. I restarted the machine and therefore do not know what else to try. Thank you

    Hey there Justix,

    I see that you're having trouble with split on your iPad. There is some information in the following article on activation of the split view, and you may want to consider this info:

    On multitasking on your iPhone, iPad and iPod touch - Apple Support

    https://support.Apple.com/en-us/HT202070

    As a general rule, you can try sliding of the section the far right of your screen in order to operate the divisor split handle. Thank you for coming to Apple Support communities!

Maybe you are looking for

  • It becomes more difficult to work without interruption.

    It becomes more difficult to work without interruption. Even with the wide, harsh pop notifications notifications - up (for example, Mail cannot connect to a server) or I'm dictated over the phone and a text cancels just my dictation. It is absurd an

  • PlayStation view will never come to Apple TV?

    It would be great if this was the case. I want my Apple TV to be my central hub for all of my television, including streaming TV as Sling. I see Roku and Amazon Fire has the Playstation view app. If PS view never come to Apple TV, I would be sold on

  • How can I update my program. I'm already up to 221 Stub 24.0 updates?

    Is there an easier way to have the latest version of Firefox/Thunderbird to have constantly to be updated constantly? I'm already up to 221 updates of 24.0 Stub with no end in sight! It's tedious, time consuming, and I don't know how long it will tak

  • Satellite L10-117 and memory upgrade problem.

    I installed the module of ram kingston 512 MB dedicated for my laptop and my system does not start. Laptop does not see its partition with windows. I tried to salvage the dvd system and he does ' t help. Recovery is going ok but after restart problem

  • Satellite T110-121 - blue screen after the installation of recovery

    Hello everyone! My name is Melanie and I want to apologize for my English: I m french! I have big problems on my laptop, I will explain: I had to install windows yesteday and I used the partition recovery, all worked but the last seetings, my compute