search string that includes spaces, but not a comma

Hi all

I search all the records that have one or more spaces, but must not contain a comma.

Example: in the "Test_Tab", he should seek only 1 form: "onlyspace."

Database version: 11.2.0.4.0

Script:

create table test_tab (col1 varchar2(100));

insert into test_Tab values ('onlycommma,');
insert into test_tab values ('onlyspace ');
insert into test_tab values ('both ,');

I did it using INSTR like

select * from test_tab
where instr(col1,',') = 0 and instr(col1,' ') > 0;

But I will try to achieve this by using regular expressions. I tried to do the same thing but cannot write to several conditions REGEXP_LIKE.

Help, please.

Thanks in advance.

Concerning

Vikram

Hi, Vikram,

Here's one way:

SELECT *.

OF test_tab

WHERE REGEXP_LIKE (col1

, '^[^,]*\s[^,]*$'

)

;

You could also write this way

SELECT *.

OF test_tab

WHERE REGEXP_LIKE (col1

, '^'      || -Since the beginning of the string

'[^,]*'  || -0 or more characters, with the exception of commas

'\s'     || -a white space character

'[^,]*'  || -0 or more characters, with the exception of commas

' $' - at the end of the string

)

;

Tags: Database

Similar Questions

  • Is it not possible to get (or use) a search string that includes a reference object?

    Hello world

    I try to get the full search string property for the property "xl" seen below at the bottom of the image.

    I can go as far as the other results [0] (which is a reference), but after that, it seems not possible to access the "xl".

    "TS. SequenceCall.ResultList [0]. TS. SequenceCall.ResultList [0]. TS. SequenceCall.ResultList [0]. "AdditionalResults [0].

    If I get the interface for the object of 'xl' and then ask 'place' in what concerns the "MainSequenceResults", I get an empty string.

    Get the property for container objects and properties in the object "xl" also give the same result when I call «GetLocation (...)» with the MasterSequenceResults the TopObject property.

    Is it not possible to have a search string that includes a reference object?

    Thank you

    Ronnie

    Hi Ronnie,.

    It is possible, but to get this value, you can use the TestStand API. I have attached a sequence file that shows how to get the values of reference of object using AsPropertyObject, and then the associated GetVal method. It is much easier to understand with an example. Let me know if you have any questions about the sample file of sequence.

  • find a file that was scanned but not renamed?

    find a file that was scanned but not renamed?

    Generally a quality consumer scanner / MFD that supports the direct scan to PDF displays the name of the file "scan #" (for example, scan1.pdf).

    Where is the value default saving location is discussed in the manual of the device.

    Be well...

  • First research of 2015 CC does not always work. For example, it will find all items that contain 'Toronto', but not all items that contain "Arnold".

    It's very mysterious. I did every step several times. I type in a single word that I know for sure watch upwards in multiple file names. Sometimes it gives me all the relevant results, sometimes it gives me no result at all. I double checked to make sure that I was looking for all the metadata. I checked, to be sure, I was typing in the correct spelling.  The only thing I changed in all cases is the word that I type in the search box. Here's what's worked and what didn't.

    Has worked:

    Toronto

    1996

    Claude

    Claes

    Proj

    Poster

    Strachan

    Pop

    Does not work:

    Arnold

    REPAR

    Adler

    Noona

    Opening

    Case No.

    Frank

    Œuvres for some files but not others:

    Wave

    I think that those who are not displayed is those where I've added something to the file name in the first, but why whatever? Is there a way around it?

    I'm on Mac OSX El Capitan v10.11.1 on a Mac Pro (end 2013) 3.7 GHz Quad - Core Intel Xeon E5 with 32 GB of RAM

    If you think this is a bug:

    Feature request/Bug Report Form

  • How can I recover a machine in vSphere that was removed, but not deleted?

    Should what precautions I take to recover/redeploy a machine in VSphere that was accidentally removed from the inventory, but not deleted from disk.

    I know that the road where the vmdk file is on our SAN.  Can I transfer this machine?

    You can of course.  Just browse through the vsphere client data store and do a right-click on the virtual machine's .vmx file you deleted - then click "Add to the inventory,"

    see you soon

    GAV

  • Format a number with a decimal number to display the value, but not the comma

    I have a value of 129,50 in the comic book. I use the function htp.prn () for this export value in a txt file. I have the field padded by leaders 0 (so it looks like 0000129.50)
    I need to keep the value for le.50 but don't want the comma appears (so I need it to look like 000012950), but can not find a way to keep the value for le.50 but not actually show the decimal point - of ideas? (APEX 4.0 11g)

    Multiply by 100 and remove the formatting. HTP. PRN (to_char (number_item, ' 99999999999'));

    Published by: Kléber M Sep 14, 2011 05:10

  • Windows 7 can search for files containing a specific string that includes punctuation

    I have a documentation for a programming language which is in the form of html on my machine and search for files that contain the string "${1}".

    However if I type that in the search box windows instead seeks any file containing the string '1' in its content or its file name or a folder (which gives me 10240 results!)

    Research I try it is possible with a different syntax (escape the $ and brackets to indicate that they are part of the search maybe string)?

    Thank you

    MOG

    Hi Mog,

    Because the question you posted is related to search for files containing a specific string, it would be better suited in the MSDN forum. Please post your question in the following MSDN forum:

    http://social.msdn.Microsoft.com/forums/en-us/windowsgeneraldevelopmentissues/threads

  • Why can I play a WMV video that I created, but not import it into Windows Movie Maker?

    Why do I get the error message "the file * *.wmv cannot be imported because the codec required to play the file is not installed on your computer." If you have already tried to download and install the codec, close and restart Windows Movie Maker, and then try to re-import the file. "even if I CAN play the video in Windows Media Player?

    I have a Windows Media Video file I recorded using another program. I can open the video and watch it in Windows Media Player, but when I try to import into Windows Movie Maker (as I did with the other videos I recorded), I get a message saying that it cannot be imported "because the necessary codec to play the file is not installed on your computer. If you have already tried to download and install the codec, close and restart Windows Movie Maker, and then try to re-import the file. "I tried to close Windows Movie Maker and reopening, she even tried to restart my computer, but it still does not work.

    Hello

    ·         What program did you use for recording to WMV file?

    ·         Are you having similar problem when you try to import the WMV file, which is not recorded by this program?

    Method 1:

    Although you can play a file in Microsoft Windows Media Player, you may not be able to import the file into Windows Movie Maker even though this article lists this kind of file. You will not be able to import the file if the codec that was used to encode the audio or video is not a codec that is supplied with Windows. In this case, you can re - encode the video or audio by using Windows Media Encoder, and then import the video or audio.

    To download the Windows Media Encoder, see the Microsoft Web site at the following address:

    http://www.Microsoft.com/download/en/details.aspx?ID=8509

    http://www.Microsoft.com/download/en/search.aspx?q=Windows%20Media%20Encoder

    See also:

    Importing files into Windows Movie Maker: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/importing-files-into-Windows-Movie-Maker-frequently-asked-questions

    Method 2:

     

    I suggest that you try to perform the SFC (System File Checker) scan on your computer and check if the problem still persists. To see how to the SFC Scan click on the link below and follow the steps in the Kb article.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

  • The touchpad scrolling works on all applications (including IE) but not in Firefox - Win 10

    My touchpad scroll does not work in Firefox. It works great with IE and other applications (Windows 10).

    If it was a driver issue - I think that this would not work in all applications, but it works fine everywhere (except Firefox)

    I can operate for a short period, if I uninstall the Touchpad (in Device Manager), restart, re - installed.

    Again, hard to believe it would be a driver problem - works fine in all applications, except Firefox...

    He stares at me

    http://dellwindowsreinstallationguide.com/Dell-touchpad-drivers/

  • Features that work with but not named user license with instrument permit.

    Hello
    Anyone know any difference between license username and an instrument for Adobe Acrobat DC permit?

    I have an instructor who opens Acrobat DC in a Windows7, 64-bit environment. She can go to file > open and open an .xlsx, .pptx, .docx .jpg, .psd or .indd file and Acrobat DC will open the file and convert it to a PDF file automatically. She has a license of user name.

    However, in our lab environment, where the computers hardware, I can use this feature for all Office products and .jpgs. but when I try to open a .psd or .indd, I get an error message saying "you must be connected to the Internet and connected to Acrobat to use this feature. Please check and try again. »

    This feature (to be able to open documents CC & convert automatically in Acrobat) available only for named user licenses?

    Thank you!

    Hello

    Yes it is true that it is recommended to disable the desktop app creative cloud for the device licenses to ensure that activation does not break due to updates.

    However, if you install it and you make sure that you do not install an update using creative cloud desktop application, although it will prompt you to do so, you can perform the task you are trying to do.

    It is mandatory that if you install desktop application creative cloud with a license of the device it should be signed using the ID of the Admin only. In this way, you can use the feature you want to use in Acrobat. Otherwise, you will not be able to use this feature with a license of creative cloud device.

  • I can see that made me, but not in number on my iphone

    When I get a call from a contact of mine that has a lot of numbers, I see that they called me, but I can see is no longer what number they used to call me. It is very useful information and we used to be able to access the list recently called the number, they used for their outgoing call should be highlighted in blue. Since the last update ios that is is no longer the case. Why is this? It's a very useful feature!

    I agree that this is a useful feature. However, the recent you gives the label of the called number, so if you have different labels for each number in a contact entry you can always find out what number called you.

  • Function to search for xml works locally but not online

    Hello

    I have a function that is triggered by a click of a button which runs through an XML file to an e-mail (entered in a text field) address and returns a match or no match.  When I run the swf file locally it works fine, but once the site is validated it no longer works.  Locally, it connects to the same xml files & php he uses online.

    I would appreciate ideas.

    Thank you

    Chris

    Looks like your XML file is cached. You must either add a random variable to xml request or write no.-cahe headers in PHP.

  • make-weight: bold;  -works in firefox, safari, internet explore 6 BUT NOT ie7

    font in bold. on an external style sheet style sheet works in all browsers (INCLUDING ie6) but NOT ie7?

    I just don't understand. It even works in ie6.

    NOTE: One thing I should mention is that I have a conditional statement of Internet Explorer to Internet Explorer specific style sheet that targets ie6 and ie7.

    But I don't think that's the question because all other styles works properly EXCEPT make-weight: bold. It's absolutely maddening.

    I tried searching around solutions and the only head I found was written [police-weight: "BOLD"! important;]  ] in using this "!" important"statement I thought would somehow ie7 to recognize. But no dice. He failed.

    Here's the cursed code:

    #date {}

    are-family: Arial, Helvetica, without serif.

    make-weight: bold! important;   / * "BOLD" appearing is not in ie7!  */

    are-size: .85em;   / * Is the size of the police affecting "BOLD" in ie7? -85% * /.

    color: #000000;

    text-transform: uppercase;

    margin-bottom:-.75em;

    margin-top: 6th;

    }

    Again, this works in all browsers, including the ie6... BUT NOT in IE7.

    Any help will keep me from pulling my hair. Thank you.

    I'm agree that these validation errors are probably not what is responsible for the lack of a "BOLD" weight, but just to finish.

    ALT = "retouchTest02" / >

    Note the capital P!

    Setting which will remove all the errors in these paragraphs.

    -Here's the shocking news.  I think you * are * getting the bold characters in IE7.  It's just that they are small.  At least, it looks like this myself in IE test...

  • error code system32\496a8300 see the problem but not the solution

    This error code has been described by several people, but he is not a listed solution.  The problem with Security Essentials?  Nothing shows up when I rans a scan but I used another program and it stoped the problem to appear on the computer, but did not remove the replacement for the office and the files that are there but not visible.  It is if someone put a skin on the computer and you cannot remove it.

    Hello

    1. when exactly you receive this message?

    2. What is the full error message?

    3. you remember of any change to your computer before this problem?

    Method 1:

    Try to do a scan of your computer for viruses using the Microsoft Safety Scanner by clicking on this link: http://www.microsoft.com/security/scanner/

    Method2:

    Search for bad sectors on your hard disk by following these steps: check your hard drive for errors http://windows.microsoft.com/en-US/windows-vista/Check-your-hard-disk-for-errors

  • Group space and personal space are not

    Version: 11.1.1.4

    When I connect to the WebCenter spaces as an administrator, I don't get the option of creating a group space. I get links for Favorites, Logout, help, administration spaces but not for the space group. Why is it so. I have all the tutorials for WC, these options are available, but when I want to explore space group I can't do both in the WebCenter spaces.

    Also, is it possible to create spaces for group to one custom space created (other than default webcenter space)?

    The pointers/help appreciated.

    I think that in the WC 11.1.1.4, concept of space is used. I do not see any group or personal spaces in my ps3 app Webcenter. All we can do is create a business role or sub-areas or space pages and assign the role or users. In this way we can decide it will be personal or belong to a group.

    Concerning
    Prasath.C

Maybe you are looking for