Find the numbers in the Varchar field

Hello

I have a Varchar2 column for data cleansing, that I wish to find here is this column:

1. pure numbers i.e.

122

33445

2. number of places that is

222 3333

3 11

3. data with any alphabet (not in any of A to Z or z) IE

3334 11-22

33 & & 44

11/99

Can someone give me please above notebooks?

Thank you
Aw j and d

To retrieve only numbers and numbers with spaces, the conditions could be simple. But for the third, you mentioned as not in a - z or A - Z. This will include only numbers also. So I used characters according to what you mentioned (-, &, /). If you have more models that also include.

SELECT CASE WHEN (REGEXP_LIKE(C1,'^[0-9]+$')) THEN 'PURE NUMBERS.

WHEN (REGEXP_LIKE (C1,'^ [0-9] + + [0-9] * $')) THEN 'NUMBERS WITH SPACES'

WHEN (REGEXP_LIKE(C1,'-|&|/')) THEN 'data with any alphabet.

VALIDATIONS END AS FROM T1;

Here's how it goes.

SET DEFINE OFF

() AS T1 (C1)

SELECT '122' DOUBLE UNION ALL

SELECT '33445' DOUBLE UNION ALL

SELECT 222 3333' DOUBLE UNION ALL

SELECT 3 11' FROM DUAL UNION ALL

SELECT 11-3334-22' FROM DUAL UNION ALL

SELECT 33 & 44' FROM DUAL UNION ALL

SELECT ' 11/99 OF DOUBLE)

SELECT C1, CASE WHEN (REGEXP_LIKE(C1,'^[0-9]+$')) THEN 'PURE NUMBERS.

WHEN (REGEXP_LIKE (C1,'^ [0-9] + + [0-9] * $')) THEN 'NUMBERS WITH SPACES'

WHEN (REGEXP_LIKE(C1,'-|&|/')) THEN 'data with any alphabet.

VALIDATIONS END AS FROM T1;

OUTPUT:

NUMBERS OF PURE 122

NUMBERS OF PURE 33445

222 3333 NUMBERS WITH SPACES

3 11 NUMBERS WITH SPACES

11-3334-22 data with no alphabet

33 & 44 data with no alphabet

Data from 11/99 with no alphabet

Tags: Database

Similar Questions

  • Find the Siebel field mapped to corresponding to the presentation layer of OBIEE

    Hi all

    I am fairly new to OBIEE, and I need to know what Siebel/fields make up a particular field in the presentation layer. I can put it back together at the physical layer in the repository, but I need to know the exact domain name / fields in Siebel. I've attached a screenshot of the source of the column of the repository, and I don't know where to look further. It is said it is derived from "sum (Fact_W_AGREE_F.GLOBAL1_TOTAL_AMT)", but I don't know what Siebel field is "GLOBAL1_TOTAL_AMT". I also tried after the mapping in Informatica Powercenter Designer and I can't seem to find the correct field.

    OBIEE.PNG

    Also, if I may ask... Why are there 2 tables of facts in the column Type of Source? What does that mean?

    Thank you for your time and your help.

    3025352,

    Outside the option proposed by Christian, you can also use the document of ETL data lineage to identify the source column. ETL team normally maintain such a document in each project. If you use BI Apps and you have not created custom fields, you can use the data lineage guide provided by Oracle. Screenshot of the doc is attached below.

  • reading, updating and moving some of the varchar field information

    We got about 123 000 addresses in Oracle 8.1
    several thousand have errors in entry.
    the direction (N, S, E, W) Street has been registered with street name in the street field not in the field of management.
    So I need search and move these.
    I need something like:
    IF him hoist Street field for the last characters of right 2 is "N" or "S" etc.
    Then work the last 2 characters on the right and the place only the character lacts 'n or s' etc. in the field of management.
    Blons rest address because it is good.
    UPDATE  address_tbl
       SET  street_name = substr(street_name,1,length(street_name ) - 2),
            street_direction = upper(substr(street_name,-1))
      WHERE upper(substr(street_name,-2)) in (' N',' S',' E','W')
    /
    

    SY.

  • Find the null field

    I have a FormCalc script that checks to see if TextField1 == 2 TextField and if he then set a value of 1, if they are not equal, then 0.

    However, the shape is setting the value to 1 even if there is no entry in each field. I think I must include an expression in the formula indicating whether fields are null do not set a value. I don't know how to do this. Can anyone help?

    Thank you

    MDawn

    replace "! ="with"No"in your code...

    ! = is a javascript notation.

    isn't a FormCalc rating...

    Thank you

    Srini

  • I have a seuillee image and I need to find the actual surface of the black region

    I have a seuillee image and I need to find the true field of the black region.iam new view.please guide me.i lab joined the image...


  • to find the real domain name

    Hello

    How to find the real field name in the table in the form of erp


    for example, there is a field EST_QTY
    When I check the history, he said that this field belongs to table XXNP_OPN_JOBLOG_EST_002

    When I check the table I can't find a column named EST_QTY


    kindly help

    Hello

    To be sure which is the column in the table that is linked to a form field, you need to open the form, make sure the block is source of table and the column bound to the field. In case you don't have a form generator, usually a good guess is to check if there is a column with the same name as the field in the table contained in the history of recording (what you did). If this fails, there may be a column with a name that is similar as ESTIMATED_QTY or EST_QUANTITY.

    But sometimes the screen field is not shot a column of the table/view (for example, if it is a calculation based on the other fields). In this case, you must open the form to know how it is filled.

    It will be useful.

  • Upgrade: numbers can not find the field to change!

    Sorry if I am dense here, I'm sure that there is an obvious answer, anyone here know, but I can't imagine it or find info already online.

    I just upgraded from Cougar to El Capitan.  Then, I upgraded a previous numbers spreadsheet to edit it in El Capitan.  After the installation, I printed it and a field I can't see anywhere on the new version, or find any path, spell on the print-out (immediately above the table and text on 2 lines).

    I think that this field used to be editable in Mountain Lion in a sidebar on the left, but I don't remember the name of it so I can't find how to access in an upgraded version.  I don't know, however, is not the name of the table or sheet name because I can see where to edit those.

    Can someone please help me find the way to access this hidden field so that I can change it?

    In advance, thank you very much for sharing your skills and your ideas.

    Jackie

    I just answered my own question!   After hours of searching in the Inspector, I had an idea more now after I had posted this question here, of course.

    In the case where it is useful to all of you who don't know already (jumped several major improvements to the operating system, so I'm exceptionally behind with new features/functions): it can be seen and edited in the print dialog box.  The 'invisible' text appears and zoom in for a better view, you can change it.

    Sorry to have bothered you and thank you for your time.

    Jackie

  • I did the most recent iOS 10 updated, just heard on the news that Yahoo has been hacked.  I changed my Yahoo email but can't find the field to change on my devices.  It is simply not there, what is happening?

    I did the most recent iOS 10 updated, just heard on the news that Yahoo has been hacked.  I changed my password to Yahoo mail but can't find the field to change the password on my devices.  It is simply not there, what is happening?

    For some reason any change automatically if change you it online. Today, I changed my password through my office and I went to change the mail and she had already changed.

    You can try to delete your account your unit off and add it again.

  • How can I find the phone numbers called from this phone?

    How can I find phone numbers of this Iphone 6?

    If you open the phone application, the list of recent calls recent 100 facts/on calls the device, with the exception of the deletions which can be done on the device. If the list is empty, then the phone has not made/received all calls or the list has been removed.

  • How to find the smaller 5 numbers on 10 "number".

    I use excel and the formula I imported to excel does not NUMBER for mac.

    = AVERAGE (SMALL (F10:X 10, {1,2,3,4,5,6,7,8,9,10}))

    It does not work for excel.

    I'm trying to find the average score of the scores the lowest of 10 out of 20 points.

    in this formula: F10:X 10 (represents 20 notes)

    1,2,3,4,5,6,7,8,9,10 {} (represents the 10 lowest grades) this is where the error is coming I think.

    Stuck.

    Any help please.

    Steve

    The numbers does not support table functions.

    You can do something like this:

    E1 = (B, ROW()) SMALL

    It's shorthand dethrone select cell E1, and type, or copy and paste, the formula:

    = SMALL (B, ROW())

    Select cell E1, copy

    Select cells E1 to E10, dough

    D1 = AVERAGE (E)

  • Find the difference between two numbers (DBL)

    Hi all

    Is there a function in labview other than the subtraction function that can find the difference between the two numbers given?

    Thank you

    Davidson


  • How to find the real width of a field (number of characters) for a particular font

    Hello

    Is there a method to find the number of characters that can fit in a field label or a BasicEditField for a particular font.  Font.getAdvance (str) gives the width in pixels.   Based on the width of the screen, I want to calculate the length of the label field number that is, characters that it can take.

    Thank you.

    Well, I did a deeper look at your code. It is a way to walk around a division, true.

    But why not work with integer values?

    int screenWidth = Display.getWidth ();

    int largestCharacterWidth = defaultFont.getAdvance ("W");

    Now you can work with these integers.

    int fieldLength;

    {}

    fieldLength ++;

    } While (filedLength * largestCharacterWidth)<=>

    It would be a little more efficient.

  • I just reinstalled my cs6 and it wants a serial number, but on my package do not match the fields required for a serial number. Where can I find the serial number of the product?

    I just reinstalled my cs6 and it wants a serial number, but on my package do not match the fields required for a serial number. Where can I find the serial number of the product?

    Find the serial number of your Adobe product quickly

  • I have all these numbers in the box of my Adobe Photo elements first items 11, but I can't find the serial number

    I have all these numbers in the box of my Adobe Photo elements first items 11, but I can't find the serial number

    Find the serial number of your Adobe product quickly

  • Find everyday odd or a string in the Notes field.

    In our environment, we are looking for a way to make sure some VMS are on the correct storage node.  I've got code working now, but like all things, I would like to make it that much better.

    Most of the time, we want our odd number VMs to stay on our 'A-Side' storage and our even number VMs to stay on storage of 'b-side '.  A virtual machine is even or odd by the number given in the Notes field.

    For example Notes for would look like this for a SINGLE virtual machine.  "Prod - payments - TC #02 ticket.

    It is the line that I am looking to clean.

    $VMs = get-data center < Center >. Get-DatastoreCluster | where {$_.} Name.Contains('-A-Side')} | Get - VM | where {$_.} Notes.Contains ('2') - or $_. Notes.Contains('#4') - or $_. Notes.Contains('#6') - or $_. Notes.Contains('#8') - or $_. Notes.Contains('#10') - or $_. Notes.Contains('#12') - or $_. Notes.Contains('#14') - or $_. Notes.Contains('#16') - or $_. Notes.Contains('#18') - or $_. Notes.Contains('#20') - or $_. Notes.Contains('#22') - or $_. Notes.Contains('#24') - or $_. Notes.Contains('#26') - or $_. Notes.Contains('#04') - or $_. Notes.Contains('#06') - or $_. Notes.Contains ('#08')} | Select Name, Notes

    Yes, this is WAAAAY too long, but it do the job.  I also have a space after '#2' to make sure that it isn't catching #20 virtual machines etc..

    Now, I know you can use %2 - eq 0 to find the odd or even days, but I don't know how to look at the field notes of powershell, remove the #XX and then check whether it is even or odd.

    Ideas?

    Try with a RegEx expression and the modulo function.

    Something like that

    $VMs = get-datacenter  |     Get-DatastoreCluster |     where {$_.Name.Contains('-A-Side')} |     Get-VM |     where {([regex]::Match($_.Notes,"#(\d*)").Groups[1].Value % 2) -eq 0) |    Select Name, Notes
    

Maybe you are looking for