Get the lines containing only numbers and English characters

ΗΙ,

Assume that there are the following lines:

Select 'RE89203' Union double all the

Select 'cd89203' Union double all the

Select 'cD89203' Union double all the

Select 'CZC4255463' Union double all the

Select '597CD83843KL' Union double all the

Select CD 90832 83843FE 597' a Union double all the

Select 597 CD 90832 ~ 83843FE' a Union double all the

Select 'CD9083283843FΔ' Union double all the

Select 'CD9083283843FΑ' of the double

In the list above, I want to get the lines containing at least a figure and English at least one character (in capital), but with the exception of these, any other character is not acceptable (and the line as well).

I tried the following, but the result set is not the direction you want:

with sample_data as

(

Select 'RE89203' Union double all the

Select 'cd89203' Union double all the

Select 'cD89203' Union double all the

Select 'CZC4255463' Union double all the

Select '597CD83843KL' Union double all the

Select CD 90832 83843FE 597' a Union double all the

Select 597 CD 90832 ~ 83843FE' a Union double all the

Select 'CD9083283843FΔ' Union double all the

Select 'CD9083283843FΑ' of the double

)

Select one

of sample_data

where regexp_like (, ' [A - Z] [[: digit:]] ',' it)

Explanations:

The value "cD89203" is not acceptable because it contains the character 'c' (in lowercase).

597 90832 83843FE record value CD' is not acceptable because there is a space.

597 90832 record value CD ~ 83843FE' is not acceptable because there is a character "~".

The value "CD9083283843FΔ" is not acceptable because there is a non-English (character 'Δ') character.

The value of the last record "CD9083283843FΑ" is not acceptable because there is a non-English (character 'Α') character.

Note:

I'm using OraDB 11 g v2

with sample_data as
(
select 'RE89203' a from dual union all
select 'cd89203' a from dual union all
select 'cD89203' a from dual union all
select 'CZC4255463' a from dual union all
select '597CD83843KL' a from dual union all
select '597CD90832 83843FE' a from dual union all
select '597CD90832~83843FE' a from dual union all
select 'CD9083283843F?' a from dual union all
select 'CD9083283843F?' a from dual union all
select 'ABCDEF' a from dual union all
select '1234' a from dual
)
select a
from sample_data
where replace(translate(translate(a, '~', '#'), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'), '~', null) is null
and regexp_like(a, '[A-Z]')
and regexp_like(a, '[0-9]')
/

Edit: See post of Chris Hunt for a more efficient version of the line 17.

Tags: Database

Similar Questions

  • I tried in several ways (in line, calls and return on this forum), but no aid has been granted on Edge inspect.  I get the message "your user name and password are incorrect, or your account has no access onboard inspect CC.  Any assistance

    I tried in several ways (in line, calls and return on this forum), but no aid has been granted on Edge inspect.  I get the message "your user name and password are incorrect, or your account has no access onboard inspect CC.  Any help is greatly appreciated.  One of my original case numbers were: 0216572509

    You need installed Adobe Creative Cloud. Check the link for more information below.

    Edge inspect FAQ EAC

  • so I'm trying to download Microsoft Silverlight to netflx, but every time I click to install it I only get the option to save it and run it, how to fix this?

    so I'm trying to download Microsoft Silverlight to netflx, but every time I click to install it I only get the option to save it and run it, how to fix this?

    Visit http://forums.silverlight.net/>

    UTC/GMT is 03:01 on Friday, October 14, 2011

  • I have illustrator cs5, and I have plans, side, rear, fronts of vehicles. I did a trace of the line of these elevations and projected using the perspective for the perspective grid tool, but I get a distorted view on it, I'm trying

    I have illustrator cs5. I have front, side, rear, plans of vehicles. I need to create 3D illustrations. I did a trace of the line of these elevations and them projected on the perspective grid using the perspective tool.  I got a distorted view of each side of the rack.  What should I do?

    Please see the establishment.

  • whenever I open a page, a security box appears telling me the page contains elements safe and secure, that I want to display the non secure items?

    original title: problem pop up safety box

    A couple of months, my daughter opened a video on utube.  The screen on my laptop turned blue with white writing and the volume went crazy.  Had to hold the close button.  Since then, whenever I open a page, a security box appears telling me the page contains elements safe and secure, that I want to display the non secure items?  I used for the display of this box on occasion, now it is on each page.  I ran windows security and norton scans and both find nothing.  Anyone have any ideas on how to solve this problem, because it drives me crazy.  Thanks in advance

    Hello Michelle,.

    You have a virus, here's what you need to do. Download and install malwarebytes of: http://malwarebytes.org/products/malwarebytes_free, be sure to update before running a full scan. If you cannot run the program at all, you will need to download a few programs of this site: http://www.bleepingcomputer.com/combofix/how-to-use-combofix it, you should get back on track.

    Also, you may have a browser redirection problem. Go to your IE tools--> internet options--> Connections tab, then click lan setting and make sure that the only box to checked in it is automatically detect settings.

    Let me know if it works,

    Jim

  • Another user has modified the line containing oracle.jbo.Key [186 primary key].

    $36F1884EBC353A84.jpg

    as summer sees in this photo, when I click on the button to edit, it will invoke the code like this:

    BindingContext bcxt1 = BindingContext.getCurrent ();

    DCBindingContainer bc1 = (DCBindingContainer) bcxt1.getCurrentBindingsEntry ();

    DCIteratorBinding iterProj = bc1.findIteratorBinding("CuxProjects1Iterator");

    DC DCDataControl = iterProj.getDataControl ();

    ApplicationModule am = (ApplicationModule) dc.getDataProvider ();

    ViewObject projVO = am.findViewObject("CuxProjects1");

    projVO.clearCache ();

    projVO.setNamedWhereClauseParam ("project", currProjId);

    projVO.executeQuery ();

    got this page with changes on the name of the project:

    $24017B6E59120421.jpg

    then click on 'done' button.invoke a procedure like this:

    State channel = null;

    DBTransaction connection BD = this.getDBTransaction ();

    CallableStatement st =

    BD connection.createCallableStatement ("start cux_projects_crud.update_proj(?,?,?,?,?,?,?); end; ", 0) ;

    try {}

    st.setInt (1, proId);

    st.setString (2, proName);

    st.setString (3, proSummary);

    st.setDate (4, null);

    st.setDate (5, endDate);

    st.setInt (6, userId);

    st.registerOutParameter (7, Types.CHAR);

    st.executeUpdate ();

    State = st.getString (7);

    Then return to the first page as the top image.

    My problem is not rested but redesigned data into DB. When I click on the button to edit again, I get ' javax.faces.el.EvaluationException: oracle.jbo.RowInconsistentException: Houston-25014: another user has modified the line containing oracle.jbo.Key [186 primary key].» This error. How to solve this problem?

    In addition, I see a problem that the changes you make in the procedure are not validated and will not be picked up by the query.

    Timo

  • Another user has modified the line containing oracle.jbo.Key [5046 primary key].

    The application of the ADF was working fine until I made the following changes. I changed the phone number field in the number to varchar2 database. Then I synced the entity with the database to take the field changes. I then updated to manually the setter methods and the Get accessor of < entity > RowImpl.java for the phone number field (channel number). I then did the changes associated with in the jspx file to show the phone field.

    Now I am facing this error: another user has modified the line containing oracle.jbo.Key [5046 primary key]. How to debug and fix this? Is that all I need to do to the view the feature-based object?

    Thank you

    Published by: user5108636 on February 8, 2012 15:31

    Published by: user5108636 on February 8, 2012 15:33

    maybe try to drop the EO/VO and create it again.

  • How to get the string (specified by row and column) of txt file with labview

    Hello world

    How to get the string (specified by row and column) of txt file with labview

    THX

    As far as I know, a text file has no column.  Be more specific.  Do you mean something like the 5th word on line 4, where the words are separated by a space, and lines are separated by a newline character?  You can read from the spreadsheet String function and set the delimiter to a space.  This will produce a 2D channels table.  Then use the table to index and give the line number and column number.

  • The file contained a virus and was deleted

    Hello

    I get the message

    the file contained a virus and was deleted

    This occurs in Internet Explorer, chrome, and Firefox (in Firefox I fixed it by going to about: Config), it started with the virus antivirus system care, which I removed, I did tests, which does not.

    Disable the warning?

    Thank you

    I did all the steps in this entire thread and no solution (good ideas, but no solution). I believe that this error message "the file contains a virus' on all downloads came from a virus on a web page (this is what I saw in my case).  When IE downloads a file, it shows he has a virus, but it's really not analyzed.  I got this message even after I've completely removed McAfee and after I reinstalled completely IE10.  It's a redirect using the points of analysis that the virus must have created.    To resolve this problem, I went to C:\ and made a random generator DIR command  He showed c:\program files\windows defender had these reparse points.  When I looked for download the latest Windows Defender, says MSFT site is no longer used on Windows 7 64 bit so I deleted the subdirectory 'C:\program files\Windows Defender' and all of its subfolders and restarted.  Problem disappeared.  McAfee and MSFT Security Essentials scans do not have that automatically remove.  Hope that helps.

  • A security update for windows vista (KB2665364) cumulative hotfix for Kiibits (KB2647518) Activex and update Windows vista ((KB2679255) I get the error codes 800736B 3 and B 8007371)

    A security update for windows vista (KB2665364) cumulative hotfix for Kiibits (KB2647518) Activex and update Windows vista ((KB2679255) I get the error codes 800736B 3 and B 8007371)  I can't find answers and I'm not tech saavy.  Every day for a month updates failed to install

    Hello

    I would suggest trying the following methods and check if it helps.

    Method 1:

    In the following article from Microsoft Fixit to reset Windows Update components and check if the problem persists, run the fixit.

    How to reset the Windows Update components?

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

    Warning: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://windows.microsoft.com/en-US/windows-vista/Back-up-the-registry

    Method 2:

    Put the computer in a clean boot state, and then try to install the updates and check if it works.

    How to troubleshoot a problem by performing a boot in Windows Vista or Windows 7:

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

    Note: once you have completed troubleshooting, try the procedure described in step 7 to reset the computer to start as usual.

    Method 3:

    Try to download updates from the Microsoft Downloads Web site and check.

    http://www.Microsoft.com/download/en/default.aspx

    Hope the information is useful.

  • Another user has modified the line containing oracle.jbo.Key primary key

    Hello

    In jdev 12 c

    I have a jsf page in a BTF, and there is a display of master(A:readonly table)-detail(B1:readonly table)-detail(B2:editable form) this page

    The (readonly table) B1 and B2 (editable form) are created on the same data control. There is no other layout compicated or functions on this page.

    The B2 (editable form) was based on a VO whose id is a type of DBSequence, and the new value has been created by a database trigger.

    I put

    All the columns that are updated by a database trigger or a PL/SQL call, are enabled for "Refersh on Insert" (for the case of the insertion) or "Refresh update" (for the case of update) or both in the entity object xml file.

    But when I submit/validate the page (form B2), the error msg 'another user has changed the line containing oracle.jbo.Key primary key' was always held randonly.

    And after the error msg, I can commit the data successfully by press the button validate again.

    How can I solve this problem?

    Thank you.

    The problem is that you use the pl/sql code. It is run out of the box. When a change is made in a row in this way, the framework removes upward, neither knowing that the change was done rightly and throws an error message.

    The code (which I copied from the other thread for reference) intercepts the error and re executs the lock in the case of the specific error.

    /*** customizing locking management:

    * Because attribute values can change 'outside' ADF standard life cycle,

    * when optimistic locking executes, the exception "Another User Changed the Row" is thrown.

    * In this case, we execute locking again, ignoring the exception

    */

    public void lock()

    {

    try

    {

      super.lock();

    } catch (oracle.jbo.RowInconsistentException e)

    {

      if (e.getErrorCode().equals("25014"))

      {

      super.lock();

      }

      else throw e;

    }

    }


    Timo

  • What is this error represents "another user has changed the line containing oracle.jbo.Key [21 primary key]."

    Mr President.

    What is this error represents "another user has changed the line containing oracle.jbo.Key [21 primary key]."

    Concerning

    You get this exception quite often when you have a business in PL SQL layer, but you can safely ignore (suppress) it by substituting the lock() method in all implementation of your entity classes.

    /*** customizing locking management: 
    * Because attribute values can change 'outside' ADF standard life cycle, 
    * when optimistic locking executes, the exception "Another User Changed the Row" is thrown. 
    * In this case, we execute locking again, ignoring the exception 
    */ 
    public void lock() 
    { 
     try 
     { 
      super.lock(); 
     } catch (oracle.jbo.RowInconsistentException e) 
     { 
      if (e.getErrorCode().equals("25014")) 
      { 
      super.lock(); 
      } 
      else throw e; 
     } 
    }
    
  • ADF: addition of the JSF error message: another user has modified the line containing oracle.jbo.Key [185 primary key].

    When you call the function DB. The function performs its operation, but shows an exception. In JDev 11.1.2.3

    And there is not another user. I'm testing alone.

    ADF: addition of the JSF error message: another user has modified the line containing oracle.jbo.Key [185 primary key].

    oracle.jbo.RowInconsistentException: Houston-25014: another user has modified the line containing oracle.jbo.Key [185 primary key].

    The problem is that the function db has a commit and my code also. However the db function called once in a case.

    Thanks a lot for your help.

  • Click on search for result code doesn't display the line containing the search results

    I use the latest version of DreamweaverCC2014 on the latest version of Mac Mavericks. I use Dreamweavers find and replace to find code in an open html document. In the search results Panel results aren't clicking on me at the relevent code line in the document. It used to work well in the previous version of DW, I was using.

    In the DW help note it is said: ' display the results of a particular search in context: select window > results to display the search panel. " Double-click on a line in the search panel. If you are looking for the current file, the Document window displays the line containing that search result. ' http://helpx.adobe.com/Dreamweaver/using/Text.html#search_for_and_replace_text

    Double-click does not display the line containing the result of the search for me. It seems to work OK in my CSS files, but not in HTML longer (1010 lines).

    Any advice? Someone at - it the same problem? Thank you

    I have the same problem with all the HTML files that have external style sheets. for example .

    So it seems to be a bug around that. When you delete the above, double click functionality works.

  • How can I get the lines for the date between 2 different days

    Hi all,

    How can I get the lines for the date between 2 different days.

    Sample data:
    Table name: Articles
    Title start_date end_date
    Heading1 08-22-2011 2011-09-11
    2011-08-01-2011-09-01 Title2
    Title 3 2011-08-21 08-21-2011
    title4 2011-08-28 2011-09-11

    Result will be:
    Title start_date end_date
    Heading1 08-22-2011 2011-09-11
    2011-08-01-2011-09-01 Title2
    title4 2011-08-28 2011-09-11

    This is my example query:
    SELECT * FROM items WHERE trunc (es.date_start) > = TO_DATE('2011-08-22', 'YYYY-MM-DD') AND trunc (es.date_end) < = TO_DATE ('2011-08-28', 'YYYY-MM-DD')

    but I can not get the expected results. Any help would be much appreciated.

    Thanks in advance

    not read your question properly before...

    Please try this

    Select * FROM items
    WHERE (TO_DATE ('2011-08-22', 'YYYY-MM-DD') between TRUNC (es.date_start))
    AND TRUNC (es.date_end)) OR
    (TO_DATE ('2011-08-28', 'YYYY-MM-DD') between TRUNC (es.date_start))
    AND TRUNC (es.date_end))

Maybe you are looking for

  • How can I import bookmarks firefox desktop for iPhone safari?

    I know that you cannot synchronize, but how do you import to iPhone safari?is there, for example, a way to bring firefox bookmarks HTML file in iPhone. and import them into safari that way? a few ideas I've included: using the dropbox app, by pluggin

  • No access to iCloud for my iMac.

    I can connect to iCloud.com without difficulty, but cannot connect to the app store or iTunes from my office iMac (last El Capitan - 10.11.4 running). Can I not sign the iMac itself in iCloud preferences. Bed check error message failed. This action c

  • Y at - it a shortcut to the address bar?

    Not likeCTRL + K for the search bar then SHIFT + Tab.orF6 then tab (and in some cases another tab) If there are shortcuts in the address bar, then why isn't it listed here: https://support.Mozilla.com/en-us/KB/keyboard%20shortcuts?as=AAQ If there is

  • Call a dll for Labview: function not found in the library

    Hello I try to call a form very simple .dll Labview. I have compiled .dll file for x 64 by using Visual Studio 2010, because I'm using Labview(64-bit). I did everything exactly as I have read in several tutorials. But the "call library function node"

  • mail from the window

    How can I change my current email address to a new e-mail using windows mail?