Phone number format

Hi team,

need your help, I am using oracle 11G.

My phone field is of type varchar2 and it shows data on format below.

81668798343000000000000

I wanted to remove unwanted zeros.

result should be 816687983430

Please help me out here

Hello

siebelD kirjoitti:

Hi team,

need your help, I am using oracle 11G.

My phone field is of type varchar2 and it shows data on format below.

81668798343000000000000

I wanted to remove unwanted zeros.

result should be 816687983430

Please help me out here

No, you don't say what the rules involved in this area. Otherwise it's hard to know that a zero belong to a phone number and rest zeros does not work.

I guess the length of phone number is 12

Select substr ('81668798343000000000000', 1, 12) of double

Tags: Database

Similar Questions

  • phone number format (999-999-9999)

    Hello

    I want to 999-999-9999 number phone this format, under query works correctly, but I want to without using how to get this.

    Select regexp_replace (lpad (67890,10, '0'),'(.{3}) (. {3})(.{4})', '\1-\2-\3') of double;

    output: 000-006-7890

    can anyone suggest me.

    Thank you

    Otherwise use? LPAD? REGEXP? Anyway, you can use to_char:

    Select double to_char(67890,'FM000G000G0000',Q'[nls_numeric_characters='.-']')

    /

    TO_CHAR (67890
    -------------
    000-006-7890

    SQL >

    SY.

  • TO_char error - number mask format - need phone number format

    Hi all

    I got a stuck in something fundamental. my contribution will be number (say 1 to 9999999999) I want to be filled in this format (999-999-9999). I tried the sub query, it does not help me.

    Select double to_char(1234567890,'999-999-9999');

    Please tell me which function is more suitable for this.


    my entry can be a single digit also, but my output should be ten-digit (ie: if I gave 1, o/p should be 000-000-0001)

    kindly help me.

    Thank you
    Jeevanand.K

    Try something like this:

    sql> select to_char(1234567890,'000G000G0000', 'nls_numeric_characters=''.-''') from dual;
    
    TO_CHAR(12345
    -------------
     123-456-7890
    
  • Display the format US phone number - best practices

    JDeveloper 12.1.3

    -Telephone table has field VARCHAR2 with phone numbers. All records have exactly 10 numbers (characters) length

    -In the user interface, I want to show number xxx-xxx-xxxx, that is to say with af:outputText or similar device

    -observe that I am looking for display, and no to entry/edit phone number

    -in search of best practices

    What I did but am not satisfied:

    -In the t 3 has created a transitional attributes with the default SQL string. For example:

    Phone1To3: substr (Phones.Phone, 1, 3)

    Phone4To6: substr (Phones.Phone, 4, 3)

    Phone7To10: substr (Phones.Phone, 7, 4)

    Then in file jsff (the table component):

    <af:outputText value="#{row.Phone1To3}-#{row.Phone4To6}-#{row.Phone7To10}" shortDesc="#{bindings.Phones.hints.Phone.tooltip}" id="ot2222"/>
    

    Another way (better, easier)?

    In my view, that the best practice is to do your own converter in this case you will not need transitional attributes as you did. After doing a converter, you can add this converter inside outputText inputText. .. to display the required format

    To find out how a converter, you can check this url

    Sameh Nassar: Create custom converter

  • format phone number

    I need to format the phone number in a column of table as phone_number to

    (+ 1-888-888-8888) to (888)888-8888


    y at - it a function or query in oracle for this.  Help is appreciated

    SQL> with t
      2  as
      3  (
      4  select '(+1-888-888-8888)' phone_no from dual union all
      5  select '888888-8888' phone_no from dual union all
      6  select '+1-888-888-8888' phone_no from dual union all
      7  select '1232341233' phone_no from dual
      8  )
      9  select phone_no
     10       , '(' || substr(phone_no_digit, 1, 3) || ')' || substr(phone_no_digit, 4, 3) || '-' || substr(phone_no_digit, 7) phone_no_new
     11    from (
     12          select phone_no
     13               , substr(regexp_replace(phone_no, '[^[:digit:]]'), -10) phone_no_digit
     14            from t
     15         );
    
    PHONE_NO             PHONE_NO_NEW
    -------------------- --------------------
    (+1-888-888-8888)    (888)888-8888
    888888-8888          (888)888-8888
    +1-888-888-8888      (888)888-8888
    1232341233           (123)234-1233
    
    SQL>
    
  • Validate / Format of phone number with Extension

    I am trying to allow users to enter a phone number, with the POSSIBILITY of adding an extension at the end, but I can't seem to get the good coding...

    Thus, users should be able to type the following:

    5555555555

    555-555-5555.

    (555)555-5555

    555-555-5555

    As well as

    55555555551234

    1234 5555555555

    555 555 5555 1234

    555-555-5555 1234

    And they should all validate/format:

    555-555-5555 ext (number of optional expansion)

    5 years and 1234 s are only examples.

    I tried to use a mask of arbitrary, but you are unable to view OPTIONAL characters method... they want to all be necessary therefor 9999999999 ext9999 eventually REQUIRE a 4-digit extension.

    Thanks in advnace for your help

    It can be done using a custom size validation script.

  • Remove formatting phone number?

    I have a form in which a user enters his phone number and I need another field to fill the numbers without any formatting. For example, if a user enters 555-232-4455 it would appear in the new domain as 5552324455. I guess it could be a script made in the field of origin on the blur, but I don't know the best way to do it. Any suggestions? Thank you!

    In the second field, you can use this custom code as the calcluation script:

    Event.Value = this.getField ("Phone No").valueAsString.replace(/\D/g,"" ");

  • Phone number in html format

    My problem is related to the recognition of phone number in the Blackberry browser: I have created a simple webpage using html and displays the numbers as 07811987654
    I need to click on it and call the phone call

    07811987654

  • All excel cell number format using "excel cell format.vi set.

    Hi all

    I am writng 12 numbers to Excel cell, but it seems to me that 2.00207E + 11 instead of 200207106040. I use entire excel function cell phone format.vi but it is not useful, because I have no number format...

    Reference in the image file setting a VI.

    Thank you

    Got the answer.

  • How to make a 'active' phone number in the text box?

    I'm testing in 10.1 and 10.2, using the following QML simulators.  What I'm trying to understand is that 'rules' the text box used to set the active text, including phone numbers.  All I'm trying to do is to put a phone number in the text box that my users the opportunity to click on it to the phone.  But I can't make it work, or more exactly, may not get the phone number to become active.  .

    As you can see that I tried a variety of number formats, some specific UK because I was afraid that he may use country specific recognition, but nothing I try works.

    On the other hand the address which I also put in the TextArea is 'hot' and started the map.

    FYI, the client is running in Canada on Q10s using 10.1.  The numbers are also completely fictitious, if they work, then that is a stroke of luck.

                    TextArea {
                        inputMode: TextAreaInputMode.Text
                        editable: false
                        content.flags: TextContentFlag.ActiveText
                        text: "#123 1234, #123-1234  ph: 780-784-1231. ph: (403)218-1248. ph: 403-242-1231. ph: (01637)123456. 81 Street NE, # 101 ,, Calgary. "
                    }
    

    I saw this:

    http://supportforums.BlackBerry.com/T5/native-development/textarea-showing-quot-phone-numbers-quot/m...

    I was expecting that I didn't set the attributes for the text using C box.

    And I don't have permissions phone - eslewhere in the application that I detect when the user is on the phone.

    Any ideas on how I could get a phone number in a TextArea to be active, would be appreciated.

    Well, for what it's worth here's what I get with your data :

  • getDevicePhoneNumber() provides the phone number with the unicode left-to-right mark

    I use getDevicePhoneNumber (boolean format) ( http://www.blackberry.com/developers/docs/4.6.0api/net/rim/blackberry/api/phone/Phone.html#getDevice... (boolean)) to get the telephone number of my camera. I know that maybe it's not the actual number. I also can't use something else as the pin of the device. I use it to fill a field "my phone number" by default that can be edited manually in the case where the number is not correctly being read on the SIM card.

    It works really well and displays the phone number in the field. However, a thorough review to the string of shows that he has the mark unicode '% E2% 80% 8F' in front of the string. This brand is known in unicode (utf-8) "BRAND LEFT-to-RIGHT ' (sources: http://www.tachyonsoft.com/uc0020.htm and http://unicode-search.net/unicode-namesearch.pl?term=mark ).

    I only experienced it in BB OS 4.6 devices (does not check 4.7 yet), but it seems not to happen in OS 4.5 and below.

    Were there changes to the orientation of the chain in OS 4.6?

    Can I get rid of this brand using String.trim (); or I have to use something else?

    This problem persists on my 9000 "BOLD", but none of my other GPS phones.

    Because it was a pain to try to understand, here's the code I used to solve this problem.

    private String trimPhoneNumber(String phoneNumber){
        byte phoneBytes[] = phoneNumber.getBytes();
        int length = phoneNumber.length();
        int offset = 0;
        if ( phoneBytes[0] == 0x3F ) {
            length--;
            offset++;
        }
    
        return new String(phoneBytes, offset, length);
    }
    
  • Get the phone number

    Hello

    I would like to get the phone number of the device by using APIs.

    Is this possible?

    DK

    Phone class
    public static String getDevicePhoneNumber (boolean format)
    Retrieves the phone number of the device if it is present

  • Contact phones number smart blackBerry when rings

    When my phone rings, it shows the phone number of the appellants, but it will not show the name if they are in my contact list. Finished the call name contacts indicated in the call log, just don't no when sounds. Any ideas? Worm 4.7.1.57

    It could be one of the three solutions... Try these:

    1. make sure that you set your own country code to the Phone Dialer screen > Options > smart dialing.
    Set your country code in this format: "+ xx" where xx = country code. Some countries have two or three-digit country Codes. Do not place not the '+' in the entrance of your contact.
    * In the United States, the value of this country as '+ 1' Code and place your local area code in the appropriate box (this normally the default setting in a new BB).

    2. in the same place, change the length of National number for the number of digits corresponding to your country (since some countries have less than 10 as that set by default in the BB). Check out the total numbers, less country code. Do not place not the '+' in the entrance of your contact.
    * For example, some countries have a total number to 8 (more than 3 for the country code). You must enter '8 '.

    3. you probably have "Content Protection" located on your address book.
    Look at the Options > Security > General settings. Scroll down to the content Protection > include addresses = no

  • I have a request for a phone number in my HTML code in my database which is automatically filled with the correct sales phone number when sending emails. I create HTML code in dreamweaver and then put the code in my e-mail program. I need to do the ph

    I have a request for a phone number in my HTML code in my database which is automatically filled with the correct sales phone number when sending emails. I create HTML code in dreamweaver and then put the code in my e-mail program. I need to make the phone number in the clickable query. I know the code to do it well not in a query. What is the code?

    As far as I saw, most of the smartphones will automatically recognize it these days, as long as the number is written in a format of regular phone number. This format also allows to make images or text other than a telephone number in a tap to call the link.

    Looking at what you have presented I guess it would be something along the lines of...

    urmcell>>">urmcell >

    When the location of the link and the link text would be the same variable.

    I've never worked with Intelliclick so above is a wild guess. They would be those who need to ask themselves if there is a way to fill in the address of a link like that.

  • GREP phone number

    Hello

    Im not no matter what good to GREP and stumbled on a GREP that formats telephone numbers, as they should.

    But I can't understand how to change that GREP, since I don't understand nothing.

    \d ( ? =(\d{2}) + \ >) | \d{1}/

    Currently my GREP is housed in a paragraph style. It applies to a character-stye with single spacing, do look good (in Germany) to phone number

    Telephone 01234/12345

    TO

    Phone 0 12 34 / 1 23 45

    So far so good!

    But currently I use two styles of paragraph for a complete address as

    123 MyStreet

    Phone 1234/123456

    do not format my street.

    I want to use only a single paragraph with GREP inside for this style, so the GREP should be changed to
    don't apply, if 'telephone ' is in front of a number.
    Is this possible? Can you experts help out me?

    See you soon

    Jan

    Seems to work:

Maybe you are looking for

  • Satellite U500 - 11G - wireless LAN does not work

    Please could some help me because I have a problem with the Realtek RTL8191SE Wireless LAN 802.11n PCI-E NIC Whenever I turn on my laptop in the seem to do not to work. You put the laptop restarting and it works I tried to talk to the pc world, where

  • Toshiba online product information do not work

    I have Toshiba Satellite A100-784.I have baught it 14 months ago. Today, I discovered that a service 'toshiba online product information' does not work correctly. I use it for awhile.So, when I start it, I receive the message (in Russian), which I ca

  • Need drivers for Win7 for Satellite A300-214

    Hello! (1) after you have installed all recommended drivers (model A300-214, PGAGCE Windows 7 32 bit) I'm still 4 devices not recognized, shown in the Device Manager program.Moreover, I found the drivers of webcam. (2) why review for this model (A300

  • Cannot type the Alphabets in the VM in Y550

    Hello I bought a Lenovo Y550 a year ago and its working well. Recently I installed the virtual machine on my system. I can not at the entrance of the alphabets in the virtual machine. It interprets the alphabets as numbers as 0,1,2... When I Windows

  • iTunes problem, when you start the Windows program "a problem" and asked for a report to be sent, then closes

    I downloaded the latest version of iTunes (11.2.2.) it opens but does not play my music, don't download or burn CDs, or allow access to the iTunes Store because Windows 'a problem' and request a report to send, then closes.  So, I use of course, that