The use of REGEXP_LIKE for query with exclusion

Hi all
How to query a column that does not contain a value with a particular letter in the middle of it with REGEXP_LIKE? Suppose I have the following text:
SQL> select * from test;

TEMP
--------------------
john
joni
jane
johny
jonny

SQL> select temp from test where regexp_like(temp,'[^h]');

TEMP
--------------------
john
joni
jane
johny
jonny

SQL> select temp from test where regexp_like(temp,'[a-z]+[^h][a-z]+');

TEMP
--------------------
john
joni
jane
johny
jonny
The above code tries to temp of query that contains no letter 'h' in the middle (so it querries joni, jane and jonny) but it can be done with
regexp_like(temp,'[^h]');
regexp_like(temp,'[a-z]+[^h][a-z]+');
given that these 2 models meet all available lines. What is the solution?

Best regards
Val

If you just want to match strings that do not contain an 'h' anywhere in the string, you can use

select temp from test where regexp_like(temp,'^[^h]*$');

If you want to allow the first and/or the last character in the string to be 'h' (hugh or hank, for example), then

select temp from test where regexp_like(temp,'^.??[^h]*.??$');

Use [a - z] instead of. and [a-gi-z] instead of [^ h] If you want to match only alphabetic characters to lowercase.

Kind regards
Bob

Tags: Database

Similar Questions

  • Type of license for the use of Veritas Backup exec with the unit?

    Nobody knows the type of license (or order number) for the use of Veritas Backup exec with the unit?

    The customer is already using the product widely in their networks, which is the license includes?

    Thank you.

    HI -.

    We use Veritas for the backup device. You will need to contact your representative of Veritas for license information - it is not provided by Cisco. Since the unit running SQL (or MSDE 2000), you will need SQL Veritas agent to back up OPEN files. We do not use dirt, but only for the backup device before performing the upgrades. And we also to break the mirror set beforehand. http://www.Cisco.com/en/us/customer/products/SW/voicesw/ps2237/products_maintenance_guide_chapter09186a0080443809.html#wp1073824

    Ginger

  • The use of DAQmxWriteDigitalScalarU32 for write channels share the same ports?

    Hello

    I have a USB-6509 and NOR-DAQmx installed 15.5.1. Using the ANSI c api.

    Is it possible to create several independent channels that use different lines of the same port?

    DAQmxCreateTask("",&th1)

    DAQmxCreateDOChan(th1,"Dev1/line0:4","",DAQmx_Val_ChanForAllLines)

    DAQmxStartTask (th1)

    DAQmxCreateTask("",&th2)

    DAQmxCreateDOChan(th2,"Dev1/line5:9","",DAQmx_Val_ChanForAllLines)

    DAQmxStartTask (th2)

    ....

    and repeat for the following strings:

    Dev1 / line0:4
    Dev1 / line5:9
    Dev1 / line10:14
    Dev1 / line15:19
    Dev1 / line24:28
    Dev1 / line29:33

    So I can use DAQmxWriteDigitalScalarU32 to write to each task independently?

    for example:

    DAQmxWriteDigitalScalarU32 (th1, 1, 10, 0 x 1, NULL)

    DAQmxWriteDigitalScalarU32 (th2, 1, 10, 0 x 2, NULL)

    DAQmxWriteDigitalScalarU32 (th3, 1, 10, 0 x 3, NULL)

    ...

    DAQmxWriteDigitalScalarU32 (th6, 1, 10, 0 x 6, NULL)

    These tasks will interfere with each other because they use the same port, but are assigned different lines?

    If this isn't the case, I bits to the data, if the task/channel does not start at the Px.0 line?

    Thank you!

    Yes, as long as you use the same line on different channels, they must not interfere with each other for this reason, you can create a channel by line if you wish

    The reference to using the DAQmxWriteDigitalScalarU32 function:
    "A sample of the integer unsigned 32-bit unique, wrote to a task that contains a single digital output channel. "Use this format for devices with up to 32 lines per port.

    http://zone.NI.com/reference/en-XX/help/370471AC-01/daqmxcfunc/daqmxwritedigitalscalaru32/

    So yes, the DAQmxWriteDigitalScalarU32 can write on each task independently

  • Recovery of the class factory COM for component with CLSID {3CE74DE4-53D3-4D74-8B83-431B3828BA53} failed due to the following error: 80040154

    When I run pdf reader applications, I get this error:

    Recovery of the class factory COM for component with CLSID {3CE74DE4-53D3-4D74-8B83-431B3828BA53} failed due to the following error: 80040154

    Hello

    1. you remember to make changes to the computer before this problem?

    2 are you able to open files from other Adobe programs?

    Follow these methods.

    Method 1: The problem is that by default, when the PDF program is used as a COM object, then it cannot be activated by the following accounts:

    (a) a Director

    (b) system

    (c) interactive

    How to solve this problem is to change the DCOM settings for the Application'S object.

    Configure DCOM

    a. click Start, type run in the start search field.

    b. type DCOMCNFG , and then press OK. (This will load the "Component Services")

    c. navigate to Component Services, click computers, my computer, DCOM Config application PDF.

    d. right-click and select Properties.

    e. Select the Security tab.

    f. in "Launch and activate permissions" select personalise and press change.

    g. press the Add button to select the "Network Service" account

    f. click on the OK button, and then test your application, it should work fine now.

    Method 2: If this does not help, you can uninstall and reinstall Adobe reader software and check.
    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

    You can download the latest version of Adobe reader from the following link.
    http://get.Adobe.com/reader/

  • I bought the photo Illustrator and ask the Adobe site plan for individuals with credit cards, but to date I have not received the confirmation email. How can I contact for more information on the good end of the order?

    Hello 11/18/2015 I bought Illustrator photo and ask the Adobe site plan for individuals with credit cards, but to date I have not received the confirmation email. How can I contact for more information on the good end of the order?

    Your subscription to cloud shows correctly on your account page?

    If you have more than one email, you will be sure that you use the right Adobe ID?

    https://www.adobe.com/account.html for subscriptions on your page from Adobe

    .

    If Yes

    Some general information for a subscription of cloud

    Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work

    Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud

    -Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp

    -http://helpx.adobe.com/creative-cloud/kb/license-this-software.html

    .

    If no

    This is an open forum, Adobe support... you need Adobe personnel to help

    Adobe contact information - http://helpx.adobe.com/contact.html

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    -Select your product and what you need help with

    -Click on the blue box "still need help? Contact us. "

  • using expressions regexp_like for invalid data

    I need to be able to locate all the records in the X column where the data are not ' 0-9 ',' *', '-', or ' '... I have an extreme mental block trying to get this to work.

    SELECT itemid, wfc_index_pil micronus
    If not REGEXP_LIKE (micronus, ' ([[: digit:]] +)')
    and not REGEXP_LIKE (micronus, "(-)")
    and not REGEXP_LIKE (micronus, '()')
    and not REGEXP_LIKE (micronus, '(\*)');

    It does not mean a line that currently has the value '245,425.54 '. Field is defined as varchar2.

    What Miss me?

    I don't think that's true. Here is the example that I used.

    CREATE TABLE REGEXP_TEST (
    comments VARCHAR2(25));
    
    insert into regexp_test values ('FirstName');
    insert into regexp_test values ('1971');
    insert into regexp_test values ('FirstName*');
    insert into regexp_test values ('FirstName-LastName');
    insert into regexp_test values ('First Name');
    

    I think that what you want for only the first line to return, for example, you want to exclude these lines were there at least 1 occurrence of 0-9, ' *', '-' or a space ' '.

    When I run your code, I get all five rows back; I think you'd only the first back row.

    -- user12175179 code
    select comments
    from regexp_test
    where not regexp_like(comments,'([[:digit:] -/*](0,))');
    
    COMMENTS
    FirstName
    1971
    FirstName*
    FirstName-LastName
    First Name
    

    First of all, all you request requires a character class. You don't need to start with the first parenthesis that delimits a group - a character class is sufficient.
    Second, to search for channels with a space inside character, add [: white:] in the character class instead of ' '.
    Third, to find instances of ' * ', you must use the a backslash to escape' *' instead of a slash (/ *->-*)
    I'm not sure of the reason why you included "(0,) ' after the character class - you know your data."
    To find at least one occurrence of the characters in the class, comply with the class definition is by + or {1} which quantifies the number of times where the characters in the class can occur.

    -- user4960749 code
    select comments
    from regexp_test
    where not regexp_like(comments,'[[:digit:][:blank:]-\*]+');
    
    COMMENTS
    FirstName
    
  • The use of Global Mapper SDK with LabVIEW

    I am really new to the use of any SDK with LabVIEW.The basic idea behind this is to trace the lat and long coordinates in global map cutomized app via Labview.I mean I'm labview data acquisition, but I want to display coordinates in global map. For what I do. I don, t have much abt MFC idea too.

    Hello together,

    I found a few resources on the Global Mapper site that you might find useful. They seem to have the same issues as you, and an employee helped answer a few questions.

    Global Mapper software LabVIEW SDK: http://www.globalmapperforum.com/forums/technical-support/8917-global-mapper-sdk-labview-software.ht...

    Global map and LabVIEW: http://www.globalmapperforum.com/forums/sdk/9116-global-mapper-labview.html

    Using LabVIEW, LabWindows/CVI, and Measurement Studio? It is a Council of Measurement Studio, but if you have any questions of LabVIEW, I suggest posting to the Commission of LabVIEW. (http://forums.ni.com/t5/LabVIEW/bd-p/170)

    Kind regards

    Jason D

    Technical sales engineer

    National Instruments

  • Use a locally swc file to optimize the use of bandwidth for an LMS

    Hello.

    I have an LMS (learning management system), which also uses elements of the virtual world as avatars, games with great graphics etc...

    Bandwidth here in Spain is bad to say the least. Games like world of warcraft ship a CD to put heavy graphics on your local hard drive. It would be a great idea for our e-learning system. Is the best way to use a CFC which is impossible to decompile? It would save a lot of headaches.

    Well, what I'm trying to ask is how can I protect our graphics piracy if installed on the pc local users.

    Thank you in advance.

    You may simply want DRM. Here are some links to check out:

    Documents from Adobe:

    http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/FLA sh/net/drm/DRMManager.html

    The use of Adobe News:

    http://help.Adobe.com/en_US/AS3/dev/WSe3d2d52902616553-41317b6911d1b4b fb29 - 8000.html

    By the way, the images are data binary just so you can encrypt them with something fast like RC4, use a library, for example:

    https://code.Google.com/p/As3Crypto/

    Ultimately if someone REALLY wants your content, there is no 100% average hackproof. I would implement a reasonable attempt at DRM or encryption, but really measure against the performance hit you'll take to do, with the knowledge that you really cannot guarantee protection in any case.

  • The use of Teamviewer for remote access to another PC from a PC

    Hello

    I have TWO PC, but unfortunately two PC has the same IP I checked ipconfig.

    I called ISP regarding on the same IP between two PCs.

    Is it possible that a PC can access second tool PC remotely using the Teamviewer software, even if TWO PC IP addresses are the same now?

    Your comments will be appreciated.

    Thank you

    Hi Altman,

    TeamViewer is a third party software. For support on the use of this product go to TeamViewer Support Center.

    Note:   software use of third parties, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • Prerequisites for the IBM I access for Windows with Windows 8.1

    I have several new computers with Windows 8.1 who need access to an AS400 via I Access for Windows.  I know that before this, I have to install 2 conditions (vcredist_x86.exe and vcredist_x64.exe) before the installation of Access for Windows.  I didn't know of these 2 conditions on Windows 8.0 installation problems, but I'm having a problem installing on Windows 8.1. Are there new prerequisites for Windows 8.1 patches!

    I I've installed Access for Windows on another machine of 8.0 and then upgraded the operating system to 8.1 without problem.

    Your help would be greatly appreciated.

    Thank you.

    Alex

    Hi LXMC,

    I'm not familiar with Iaccess, but you have installed the latest service packs to the site:

    http://www-03.IBM.com/systems/power/software/i/access/windows_sp.html

  • This Configuration of the laptop will work for editing with Premiere CS4 ACVHD?

    Here are the specs that I have configured:

    HP Pavilion dv7t customizable Notebook PC

    EPP_00_XY757AV

    • black cherry
    • Genuine Windows 7 Home Premium 64-bit
    • Processor Quad Core of Intel Core i7-740QM (1.73 GHz, 6 MB L3 Cache) w/Turbo Boost up to 2.93 GHz
    • 1 GB DDR3 graphics ATI Mobility Radeon (TM) HD 5650 [HDMI, VGA] - for Quad Core Processors
    • 8 GB memory (2 DIMMs) DDR3 system
    • 1 TB 7200 RPM double hard drive (500 GB x 2) with Protection for hard drive HP ProtectSmart
    • No additional desktop software
    • No additional security software
    • Battery 6 cells Lithium-Ion battery (standard) - up to 5.0 hours +++
    • 17.3 "diagonal HD + high-definition HP LED BrightView Widescreen Display (1600 x 900)
    • Engravers Blu - ray and DVD SuperMulti burner
    • Webcam HP TrueVision with digital Microphone built-in
    • Intel 802.11b/g/n WLAN
    • Standard keyboard
    • HP Home & Home Office store other envelope

    I need a laptop to help with time I'll be traveling and need to get out the videos in the night.

    Thanks in advance for any help provided.

    Al

    Well, if I were to buy this model I would intensify the processor i7 - 2620 m for only $95, plus you get a helping hand from 2.0 GHz to 2.7 GHz.  CPU is the most important point for NLE.  If for any reason any you are not upgrading CPU, cut back on the graphics card to the GT 550 M

    How do you meet the minimum requirements of system Adobe Premiere of 2 hard drives?  I see that they offer a second option.  If you are sure that it does not require a Dell in car of the brand and that it requires no additional hardware to install it you might be able to do it yourself which would be a bit cheaper, but there are two risks I mentioned.

    Post edited by: Bill Gehrke

    Sorry I missed yout hard dtrive x 2 in the description.  I see that you are covered here.

  • Question about the use of EM on machine with 2 active instances

    Hello

    As a free workout, I created 2 instances on a single machine. The machine is, server and client. I'm running Windows XP SP2, Oracle 11 GR 2 (as seen in my handful of user) and using IE7 for MS.

    The URL of the first instance is:
    https://Oracle2Day1.john.local:1158/em
    The URL for the second instance is:
    https://Oracle2Day1.john.local:5500/em
    If I connect to one and the same instance, then everything works fine.

    When I log you at first, then in the second instance, and switch back to the tab of the first instance, I find myself back at the page "user name/password / Connect as", even I don't get the page saying that I was disconnected in the first instance.

    Of more, if at this time, I return to the tab of the second instance, I find myself on the page "user name/password / Connect as ' for this instance too.

    Basically, whenever I log in proceedings and switch to tab from one case to another, it brings back me to the log in page for both instances.

    If I connect in one instance and do not try to connect to the second instance then everything works fine.

    Any ideas as to why I can't be connected to two instances at the same time? (I myself can be connected in two cases, simultaneously using SQL * more without any problem) Is there something I can do to fix this or is it "normal"?

    Thank you for your help,

    John.

    Aman... wrote:
    This is the limitation of the database console 'free' John. It can be used only one instance at a time. If you want to have a maintenance single window/console to manage the two databases, you must use the option of paid console grid .

    HTH
    Aman...

    It's a little confusing ;) If he opens the 2 consoles EM in 2 separate browsers, should not this market? ;)

    John: Can you please try that ;)

  • The use of two external displays with my Macbook Pro 7.1

    Can I use two external VGA monitors with my Macbook Pro 7.1 (mid-2010)? What do I need to connect them? A mini display port and a VGA splitter?

    I think it is a good idea.

    But what you can do is to get a mini displayport to VGA.

    Then get this one. In this way I think than its cheapest

    http://www.Amazon.com/GP/product//B00CIZ5C5I/ref=twister_dp_update?ie=UTF8 & PSC = 1

  • tab of the use of space for vSphere 6.0 disk...

    Hello everyone,

    in vsphere 5.x, there is a tab that shows the use of the disk of all or selected virtual machines.

    In short where he in vsphere 6.0 or have it remove altogether? If so, how can we get the information now?

    Concerning

    Harro Nehlsen Nehls

    what you hear is storage views

  • USING SEVERAL PARAMETERS FOR GET_SEARCH_RESULTS WITH THE HELP OF API RDCI

    Using Oracle Web Center content Web Service, I'm able to pass several parameters to the search entry to GET_SEARCH_RESULTS.

    " < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    " < soap: Body = xmlns:ns1 ' http://www.Oracle.com/UCM "> "

    < ns1:GenericRequest webKey = "cs" >

    < ns1:Service IdcService = "GET_SEARCH_RESULTS" >

    < ns1: User / >

    < ns1:Document >

    <!-ns1:Field name = "QueryText" > xCUSTOMER_MSISDN & lt; contains > '044444444' < / ns1:Field->

    < name ns1:Field = "QueryText" > xCHANNEL_ID & lt; contains > '11222212' < / ns1:Field >

    AND

    < name ns1:Field = "QueryText" > xCUSTOMER_id & lt; contains > '08848484848' < / ns1:Field >

    AND

    < name ns1:Field = "QueryText" > xCHANNEL & lt; contains > 'ISL' < / ns1:Field >

    < / ns1:Document >

    < / ns1:Service >

    < / ns1:GenericRequest >

    < / soap: Body >

    < / envelope soap: >

    How do I pass several entrance to search for GET_SEARCH_RESULTS parameter when you use the RDCI API?

    I have this code RDCI, but I get parse error as soon as I try out several settings. It works very well with a single parameter. Please advice

    Public Shared Sub {search (String content_dDocName)

    String queryText = "dDocName < match > '" + content_dDocName + "'";

    create the binder

    DataBinder searchResultBinder = idcClient.createBinder ();

    fill the binder with the settings

    searchResultBinder.putLocal ("IdcService", "GET_SEARCH_RESULTS");

    searchResultBinder.putLocal ("QueryText", queryText);

    searchResultBinder.putLocal ("ResultCount", "20");

    run the query

    ServiceResponse searchResponse;

    print a Boolean = false;

    for (int counter = 0; counter < 1000; counter = counter + 1) {}

    try {}

    searchResponse = idcClient.sendRequest (userContext, searchResultBinder);

    If (! print) {}

    myExecutable.logEvent ("GET_SEARCH_RESULTS successful call.");

    print = true;

    }

    } catch (IdcClientException e) {}

    myExecutable.logEvent ("GET_SEARCH_RESULTS failed");

    e.printStackTrace ();

    return;

    }

    DataBinder searchData;

    try {}

    searchData = searchResponse.getResponseAsBinder ();

    } catch (IdcClientException e) {}

    myExecutable.logEvent ("cannot get the answer.");

    e.printStackTrace ();

    return;

    }

    DataResultSet search results = searchData.getResultSet ("SearchResults");

    If (searchResults.getRows () .isEmpty ()) {}

    continue;

    }

    myExecutable.logEvent ("successfully obtained response - (s) dDocName ' following was found:" ");

    Iterator it = searchResults.getRows () .iterator ();

    While (it.hasNext ()) {}

    Date of birth of DataObject = (DataObject) it.next ();

    myExecutable.logEvent (dob.get ("dDocName"));

    }

    return;

    }

    myExecutable.logEvent ("failed to get a response at the time given.");

    }

    You can provide several search parameter to RIDC as follows:

    dataBinder.putLocal ("QueryText", 'xOriginalServiceId 'DISO' xApprover 'fmwtuser' ')

    In above query, I gave 2 search parameters.

    You can replace OR with AND & also you can replace 'contains' by 'correspondences' according to your requirement.

    -Prashant

Maybe you are looking for

  • install the keyboard with encryption in mac

    Hello I'm a new Mac user, so I apologize if the question seems fundamental (in fact, hopefully the solution is Basic). I have a Mac with OS X, 10.11.5 and I chose to have a Spanish keyboard with cable and encryption algorithms. In system preferences,

  • cellForAtIndexPath has not been called in ViewDidLoad()?

    Hello everyone, I made a simple application chat which is analysis by Protocol NSXMLParserDelegate an XML file from public API and shows pictures of cats in a TableView. It works fine, but I'll try some refactoring. I did a CatsDataSource like! Class

  • Videos no longer play in Firefox

    I am an avid Firefox user since about 2008, but my main browser on this laptop I've had for about 18 months. A month ago, videos randomly stopped playing, I have the latest, most up-to-date browser adobe flash player and have tried everything on this

  • Portable computer technology

    Hi, I have a laptop without OS, while technology is supported by my laptop? (as a HP CoolSense...) HP Probook 455 G1

  • How will I know if a current video card supports new HP 2511 x LED monitor?

    I have HP Pavilion a750y (PJ621AV) CTO Desktop PC, Pentium (r) 4 CPU 3.20 Ghz,.99 GB of RAM, Microsoft Windows XP, Service Pack 3. Always have the same square screen, it came with December 2004: HPvf15 flat screen monitor with "Intel (r) 82915 G/910G