How to seperate numbers and characters in a column

Hi,
In my database i have a table named birth.DBA prior to me created a column with data type var char,for which data type number must be allocated.Both characters and numbers are entered into that column.now i have to change my data type into number.how can i do this.
My idea is to first separate numbers and characters in that column.But how can i do this.can u please suggest.

use regular expressions
SELECT regexp_replace('aa123','[[:digit:]]') from dual;
SELECT regexp_replace('aa123','[^[:digit:]]') from dual
hth
Marco

Similar Messages

  • Truncating the leading zeros which has both numbers and characters

    Hello Everyone,
    Can anybody pls help me to truncate the leading zeros in the incoming file structure which has both the numbers and characters.
    Thanks,
    Chinna

    HI,
    Write a UDF like this ..
    public class test {
    public static void main(String[] args) {
    System.out.println(args[0].replaceAll("^0*",""));
    Also you can use XSLT for this.
    Try the XPath function number($string) in your XSLT and see if it does what you want. Since it turns any XPath object into a number, the leading zeros won't appear.
    Use it ike this
    <xsl:variable name="a">
    <xsl:call-template name="removeLeadingZeros">
    <xsl:with-param name="phone">
    <xsl:value-of select="EVENT/ContactPhone"/>
    </xsl:with-param>
    </xsl:call-template>
    </xsl:variable>
    <xsl:template name="removeLeadingZeros">
    <xsl:param name="phone"/>
    <xsl:message>
    <xsl:value-of select="$phone"/>
    </xsl:message>
    <xsl:choose>
    <xsl:when test="starts-with($phone,'0')">
    <xsl:call-template name="removeLeadingZeros">
    <xsl:with-param name="phone">
    <xsl:value-of
    select="substring-after($phone,'0' )"/>
    </xsl:with-param>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$phone"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    Regards
    Aashish Sinha
    PS : Reward Point if Helpful

  • Does LabView program behave differentl​y under Traditiona​l Chinese version from regular English version. The program reads in numbers and characters from input files.

    Does LabView program behave differently under Traditional Chinese version from regular English version. The program reads in numbers and characters from input files.

    Hope this helps,
    Ankita

  • How Do You Place  ( and ) Characters in Code?

    How Do You Place( and )characters in Code? Example (302). THANKS.

    What do you mean?
    "(" and ")" are used in expressions much the same way they are used in algebraic expressions. They are also used to enclose a type name to form a cast specifier, to enclose the expression that defines the condition of an if, for, while or switch statement and they are use to enclose the formal argument list in a method declaration and the actual argument list in a method invocation. They can also appear in string constants. I probably left out a couple...

  • How can I copy and then insert a column in Numbers 09

    I have a column in a Table that I would like to copy and then insert this column into another existing table on the same sheet. I don't want to copy and paste this, but rather insert it between existing columns.
    Thanks
    Eric

    Thanks SG,
    I have reverted back to 09' because of the nonexistant functionality of 3.0. I tried the option method you mentioned and it doesn't seem to work in 09'. Have you tried it in this version.
    Eric
    PS 3.0 has beautiful interface, perhaps they will add some functionality someday.

  • How to control numbers of characters in a input field?

    Hi all
    I need to limit the maximum of input characters to 255 in the field: vendortxt at the Shopping Cart. Do anyone know how to do this.
    Regards, Bjarne

    Hi,
      You can use the BBP_DOC_CHECK_BADI to read the number of characters entered in the text field VENDOR_TEXT and accordingly throw the error message if it exceeds 125 characters.
      In the BADI,use the FM BBP_PD_SC_GETDETAIL to read the details of the SC.In the table E_LONGTEXT,you wil get the value for Vendor text.
    BR,
    Disha.
    Pls reward points for useful answers.

  • How to seperate iphone and ipod

    not sure how to make her another user without her havinin an email can i do it with my email

    I think you have to have seperate emails for each account.....

  • How to prevent Numbers and special charecters entry in character field

    Hi all,
    I have a text field of character type i want to user just enter A-Z or a-z with only space character do not enter 0-9 or or Special Characters, i used format mask like FMAAAAAAAAAAAAAAAA but this not allowing SPACE between characters. Anybody can help!

    That's what regular expressions are for:
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions130.htm#SQLRF06302
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions129.htm#i1239887
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/conditions007.htm#i1048942
    When you validate your item you could replace all character you do not want (or check for their existence with regexp_instr).
    cheers

  • How to show value and unit in different columns

    Hi All,
    I need ABAP help for the below requirement in BI7.0
    Data source contains  the field Amount in local currency (Data source is flat file of CSV format)
    Amount in local currency
           1000  INR
           2000  INR
           1000  GBP
           2000  EUR
    I have to get this value in target like below( value and unit should be in different columns)
    Amount in local currency              0currency
           1000                                           INR
           2000                                           INR
           1000                                           GBP
           2000                                           EUR
    Can any one help me how to declare the data type for  Amount in local currency and how to show this value in two columns in the target.
    Thanks,
    kishore.

    TYPES:BEGIN OF ty_stru,
      s1 TYPE string,
    END OF ty_stru,
    BEGIN OF ty_stru1,
      s2 TYPE string,
      s3 TYPE string,
      END OF ty_stru1.
    DATA:itab TYPE TABLE OF ty_stru,
          wa LIKE LINE OF itab.
    DATA:itab1 TYPE TABLE OF ty_stru1,
         wa1 LIKE LINE OF itab1.
    START-OF-SELECTION.
    "--Input--
    In input 1000 and USD having space
      wa-s1 = '1000 USD'.
       APPEND wa TO itab.
      wa-s1 = '1000 INR'.
       APPEND wa TO itab.
      wa-s1 = '1000 EUR'.
      APPEND wa TO itab.
    "--Input--
      LOOP AT itab INTO wa.
    SPLIT wa-s1 AT space INTO  wa1-s2 wa1-s3.*------> split command
    APPEND  wa1 TO itab1.*---------------->splited value store into another internal table
      ENDLOOP.
    "--Display--
      LOOP AT itab1 inTO wa1.
        WRITE: wa1-s2,
               wa1-s3.
      ENDLOOP.
    "--Display--
    Output:
    1000 USD
    1000 INR
    1000 EUR
    This is simple prgram for split a string into two different string based on space
    regards
    Dharma
    Edited by: dharma raj on Aug 19, 2009 2:01 PM

  • Where is the redemption code located on elements 13? The numbers and letters i entered come up invalid

    Where is the redemption code located on product elements 13. There are numbers and characters on the box and on the cd sleeve.

    Or even in a prepaid card as per this picture:
    Click on the image and get the necessary instructions how to redeem it to get proper serial number.

  • Word Count - ignore numbers and symbols

    Hi Guys,
    can anyone tell me how to ignore numbers and symbols by adjusting the script below, i.e., just counting letters in a whole document.
    myDoc = app.activeDocument
    h = 0
    for ( var j = 0; myDoc.stories.length > j; j++) {
    h = myDoc.stories[j].words.length + h
    alert("You have " + h + " words in this document" )
    Cheers,
    Samuel

    In CS3 and later you can use this:
    app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat = "[\\u\\l][-\\u\\l]+";
    found = app.documents[0].findGrep ();
    alert ("You have " + found.length + " words in this document.")
    A "word" is defined here as any string of upper- and lower-case letters and hyphens. Maybe that's too strict, but you can tweak the GREP to suit your needs.
    Peter

  • Substr and instr for long column

    Plesae need support ,how can use instr and substr function for column with long datatype
    select substr(rec,1,(instr(rec,'?',1))) from F_DE_O_HISTORY_QUEUE_PRE_TST2
    rec column is long,When execute this select message displayed as ORA-00932: inconsistent datatypes: expected NUMBER got LONG

    Try to create a global temporary table and work on this table using DBMS_LOB.INSTR and DBMS_LOB.SUBSTR:
    SQL> desc t;
    Name                                      Null?    Type
    X                                                  NUMBER(38)
    Y                                                  LONG
    SQL> create global temporary table tmp on commit preserve rows as select x, to_lob(y) as y from t ;
    Table created.
    SQL> desc tmp;
    Name                                      Null?    Type
    X                                                  NUMBER(38)
    Y                                                  CLOBEdited by: P. Forstmann on 19 janv. 2010 12:42

  • How do I use page numbering and a text block in a footer in Word with the Report Generation Toolkit?

    I am creating a Word document with the Report Generation Toolkit, and LabVIEW 8.2.1. In the report I am using a template that has page numbering enabled in the center. When I try to add a text block to the left side footer, it eliminates the page numbering and adds my text on the left side. I found "Set Report Footer Text" and "Word Set Page Numbering" vi's that may be the clue to this. When I use these two vi's I either get Page 1 of 456789-001 on the left side, or if I reverse the order I get only 456789-001(text) in the left side with nothing in the center. What I would like to achieve is 456789-001(text) on the left footer, and Page 1 of 2 in the center. Is this possible and if it is, then how can I do it?

    Hi SciManStev,
    I have attached a vi where you can see how they can be made to work together. You have to design it such that one follows the other. If you don't design it that way, it results in a race condition and only one of them get executed.
    Good Luck!
    Warm regards,
    Karunya R
    National Instruments
    Applications Engineer
    Attachments:
    SciMan1.vi ‏14 KB

  • I can't seem to see sync my mac and iphone using iCloud with numbers and pages how can i correct this?

    Hi
    I've used Numbers and Pages for IOS for sometime now and when i use safari to look at my icloud account i can see all my files. Recently i bought Numbers for Mac and now whenever i create a spreadsheet on my mac i can't see it on my iphone but i can if i login to icloud. In fact i can only see about 16 files on my iphone when there is over 40 files.
    Although i don't yet have pages for mac i now have a similar problem with Pages, whenever i edit a file or even create a file on IOS it doesn't appear in icloud.
    I did think it was something to do with me not selecting backup to icloud so i then spent £14 to upgrade my storage to 15GB and that hasn't helped.
    I've checked all the settings and can't see anythng that will cause the problem.
    My iphone is running IOS 6 and my Mac is running Mountain Lion 10.8.2
    Does anyone know how to correct this mess?
    Many thanks in advance.
    Mick.

    Problems with buttons and links at the top of the page not working can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

  • How can I display special characters of NonEuropean languages (French, Italian, Spanish, German and Portuguese.) using import string mechanism

    I would like to translate the User Interface of my application to French, Italian, Spanish, German and Portuguese.
    When I put special characters in the import string file they showed up as ? (question mark)
    The import strings file includes the following parameters for each string: font, text, size and style. (but no field for script)
    In order to use a unicode font such as Arial I need to select a french script. But this option is not supported bu LabView (As far as I saw)
    A) Is there a font which is directly German/ French etc and not regula font + script parameter?
    B) Are there another required step
    s for special characters support? (When I put speciual characters in the import string file the showed up as ? question mark)

    This was discussed last week in this group- read the previous messages.
    Look for the thread "Foreign Languages in Labview"
    And recite the mantra
    ActiveX is good
    ActiveX is holy
    All Hail Bill
    Those who claim otherwise are heretics and not to be trusted
    Actually, in this case the non-ActiveX suggestions may be good.
    talia wrote in message
    news:[email protected]..
    > How can I display special characters of NonEuropean languages (French,
    > Italian, Spanish, German and Portuguese.) using import string
    > mechanism

Maybe you are looking for

  • Flash file not opening in XP system

    hi...       I did one flash file by using Action Script 3.0. That SWF running in Vista and Windows7 systems but it not running in XP systems.      What the Resion for that..

  • HOW TO DELETE THE ROW FROM DATABASE

    hI, Iam pasting my code below.My problem isi retrieve rows from database and display them in jsp page in rows.For each row there is delete hyperlink.Now when i click that link i should only delete the row corresponding to that delete link temporarily

  • Error at the time of Marketing Attributes Assignment to BP

    Dear Experts , I am facing some problem at the time of assignment of marketing attributes to a BP. it is giving me an error saying "Inconsistent characteristic value assignment". Please guide me how to go about it. Regards, Nikhil

  • Access my JSP by IP but not by Named

    I can not see my JSP using an Named, but I can see Using the IP Address. Where Could be the problem. I give to my JSP an IP address and a port.

  • Optimize video, not working...

    While trying to insert a clip into a storyboard (slow motion), iMovie keeps alerting me: that clip needs to be optimized.  but when i optimize, it still does not let me add the clip. (?)  It seems to only be a problem for the slow motion clip.  The v