How to include my country code in the begging of every contact

Dear all,
i have phone contacts in a table with 13000 records, i want to update them and include my country code (968) in the beggining of every phone number.
the length of our phone numbers are 8 charracter excluding country. like a typical phone number is below
92752155
i want to include 968 in the begging
96892752155
problem is that some numbers are short than 8 charachters, some are long then 8 characters (wrong data entry).
i want to update only those numbers which have 8 character length, and dont have the 968 in the begging.
how could i do that?
i am using oracle 10g on windows 2003 server.
thank you.

think????
SQL> with dat as
  2  (
  3  select '92752155' ph from dual
  4  union all
  5  select '9275215' ph from dual
  6  union all
  7  select '927521550' ph from dual
  8  union all
  9  select '96852155' ph from dual
10  )
11  select '968'||ph ph from dat
12  where length(ph) = 8;
PH
96892752155
96896852155
SQL> with dat as
  2  (
  3  select '92752155' ph from dual
  4  union all
  5  select '9275215' ph from dual
  6  union all
  7  select '927521550' ph from dual
  8  union all
  9  select '96852155' ph from dual
10  )
11  select '968'||ph ph from dat
12  where (length(ph) = 8 and ph not like '968%');
PH
96892752155
Just have a look at the result and tell me how you THINK that it is correct!
Regards,
Jagdeep Sangwan

Similar Messages

  • How to prevent users from entering '+' or '0' in front of country code in the phone number field?

    Requirement:
    How can I prevent guest users from entering '+' sign or '0' in front of country-code in the visitor phone number field during self registration?
    Few SMS service providers are not looking for '+' sign or '0' or '00' in front of the international phone numbers to trigger the sms. Providing these values in front of country code during self-registration may fail to deliver the sms to recipient.
    Solution:
    Using a simple regular expression, you can validate the entered phone number during the guest registration. 
    The below regular expression will help you to validate the phone number and allows to register only  when the phone number is not staring with '+' or '0'. 
    ^[1-9][0-9](\d{7}|\d{8}|\d{9}|\d{10}|\d{11}|\d{12})$
    It also performs the below validations.
    only numbers are allowed.
    first digit of the entered phone number should be 1 to 9, so '+' or '0' is not allowed. 
    numbers from 0 to 9 are allowed from the second digit.
    also validates phone number length, the length of the phone number should be 9 to 14.
    Configuration:
    To add the above regex in the visitor_phone number filed, please navigate to ClearPass Guest >> Configuration >> (Pages)Guest Self-Registration >> select the self-registration page and go to Edit >> Register Page >> Form >>  select the filed visitor_phone and set the Validator to " ISRegexMatch" and enter the above regex in the Validator Argument filed as shown below.
    Note:  Edit the Validation Error as per your requirement.
    Verification
    Adding the given regex will validate the phone number and prevent the guest user from registering the phone number starts with '+' or '0'.
    Please find below the sample outputs for your reference.
    Result when phone number starts with '+' or '0'.
    Successful registration.

    Is this a Mac Preview issue?

  • How do I insert a WAIT or a PAUSE function, followed by a constant string of numbers [international code, country code and the destination phone number].

    I'd like to program a LOCAL ACCESS NUMBER, then insert a WAIT or a PAUSE function, followed by a constant string of numbers [international code, country code and the destination phone number]. Dialing the local, US  access number is not an issue, but I can't find any info in the manual on how to insert a WAIT or PAUSE or how to insert the remaining string of international codes and destination phone number. Any help would be appreciated. Thanks!

    How to Add Pauses when you Dial a Number on the Samsung Galaxy Note 3 - For Dummies
    It is also described on page 42 of your owners manual...

  • How to Include JAVA script code in SAP BI7 web Reporting?

    How to Include JAVA script code in SAP BI7 web Reporting?

    In nw2004s there is a new web item called "Script" web item which lets you add javascript code. When you add javascript code in this web item, you don't need the opening and closing <script> tags...
    Hope it Helps
    Chetan
    @CP..

  • How can i change country code for a 3310 all in one? we have moved from Japan to Germany

    We have moved from Asia/Japan to Germany. I bought a set of new cartridges, which unfortunately are not accepted by the printer. Need help..... In the internet I found that I am not the only one to have this problem. As the printer is older than a year I either _ throw away.....or.....move back to Japan.   Both are not alternative. Can someone help. Need guidance on how to change the country code of the printer

    enno,
    Check out this post. It has some real good information about ink after moving to another country.
    http://h30434.www3.hp.com/t5/Ink-Toner-Cartridge-Printhead/Finding-and-installing-cartridges-after-m...
    If I helped you at all it would be great if you clicked the blue kudos star!
    If I solved your post please mark it as solved to help others.
    I'm a printer tech with HP.

  • How to include in table of contents the list of figures and list of tables?

    How to include in table of content the "Table of contents", "List of figures" and "List of tables"? All are generated with function Table of contents, but they will not appear in generated table of contents even if they have proper style of headings - Heading 1, as other chapter.
    I get this in generated Table of contentes of my dissertaion thesis:
    Table of contents
    Preface
    Table of contents <- missing
    List of tables <- missing
    List of figures <- missing
    Introduction
    Main
    Conclusion
    Is it ok, that generated lists are not included in table of contents?

    You've just confused me.
    My understanding of how this is set up is that either:
    This is a book, and there is a master TOC that includes all book documents and a document-specific TOC in each component file, or
    This is a single file and there is one master TOC that includes all sections and a section-specific TOC that includes only the individual section.
    In the first case, I think you would want two TOC styles set up, one that includes the chapter heads (if I understood how you said this worked) for the for the master, and you would include all docs in the book when you generate it, and a second style for the individual chapters, with the subheadings you want to include.
    In the second case, it would be similar, but instead of only one style to cover the section TOCS, I think you would need to create a unique set of pargraph styles for the headings in each section (they can all be the same format, based one section, just with unique names), and then make a TOC style for each section that includes only the styles from that section.
    OK,  wait a sec. I just reread what you said: "Another thing: when the numbers are "linked" and updating well, they  display indide a little box. Not a text box, but a kind of little frame  around the numbers. That frame makes it imposible to delete just one  number: when the TOC says that Section 6.1 is in page 135, for example,  you cannot delete just the 5, it deletes, not just the 3 numbers, but  also the doted tab."
    I think these are NOT normal TOCs created by using Layout > TOC (but you could replace them with ones that are, if you set up your styles properly and the text you want to include is appearing on the pages). Those little boxes you mention sound like cross-references, which should update automatically without any intervention at all. Unfortunately, cross-refs can be flakey, especially if they point to another document. I'd open the cross-refs panel and see if you need to recreate a bunch of links.

  • How to Mapping of company code to the billing units

    Hi,
    Please help me how to Mapping of company code to the billing units , iam doing the rollout project.
    Thanks
    Mustafa

    Hi Mustafa,
    External billing (A): Billing is controlled in the R/3 System.
    The company code is determined by the accounting adapter which calls
    the R3 system. You define the company code to be transferred in
    Customizing under:
    Customer Relationship Management
    Master Data
    Organizational Management
    Cross-System Assignment of Organizational Units
    Assign Company Codes and Business Places to Billing Units or
    Assign Company Codes to Billing Units.
    Also you can check attached note 717476 for further information.
    Cheers,
    Brian.

  • How to display my country flag on the task bar in osx mavericks?

    How to display my country flag on the task bar in osx mavericks?

    System Preferences > Keyboard > Input Sources
    Checkmark the box beside "Show Input menu in menu bar".

  • How to speed up my code inside the for loops,

    how to speed up my code inside the for loops using c# WinForm.

    Hi  John,
    Please take a look at the reply from Wyck in the following thread.
    How to speed up for loop?
    His answer is very comprehensive.   Thanks.
    Best regards,
    kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Based on personel number, how do I get country code for that person?

    Based on personel number, how do I get country code for that person? Is there any function module to allow me to do that? Thanks!

    Hi,
    Check function module HR_PERNR_COUNTRY_GET.
    Donnie

  • How can I set home page for a new tab? how can i get firefox to open the home page every time i open a new tab in Windows vista home basic??

    How can I set home page for a new tab? how can i get firefox to open the home page every time i open a new tab in Windows vista home basic??
    == This happened ==
    Every time Firefox opened

    Firefox can have multiple home pages if you wish. Each home page that will open when starting Firefox is separated by the "|" character.
    See: http://support.mozilla.com/en-US/kb/How+to+set+the+home+page
    To have new tabs open a specific web site, add one of the following extensions:
    http://sogame.awardspace.com/newtaburl/
    https://addons.mozilla.org/en-US/firefox/addon/777

  • I just buy an Ipad2, and I am not able to use my Apple ID to download Apps. Each time, a window open and ask me to fill my billing informations (my Security Code). The problem is every time I put this number and click ''done''...say contact Itunes support

    I just buy an Ipad2, and I am not able to use my Apple ID to download Apps. Each time, a window open and ask me to fill my billing informations (my Security Code). The problem is every time I put this number and click ''done''...say contact Itunes support

    Contact iTunes:
    Apple - Support - iTunes - Contact Us

  • How do I remove multiple entries in the "Groups" index of contacts?

    How do I remove multiple entries in the "Groups" index of Contacts on the iPad?

    The Profile Manager is for all versions of Firefox you have installed - every Profile that is listed in the '''profiles.ini''' file will appear there. The location of the Profile folders has no effect on what the Profile Manager dialog window shows. There is no way to set it up relative to one program installation.
    Best thing to do is to have separate desktop shortcuts for each Profile / Firefox-version you want to use.
    http://kb.mozillazine.org/Shortcut_to_a_specific_profile

  • How can I call contacts from my list without the country code that is registered with that contact?

    I have all my contacts registered with a country code. When I want to make calls from my iphone, I do not want the phone to dial the country code, but only the area code. How can I make that happen?

    Your 3G backup contains your contacts already, you don't need to sync them to Outlook or anything just restore the backup file from the 3G onto the 4S and you should be good to go.
    This kb article should help:
    http://support.apple.com/kb/ht1414

  • How do I change the country code on the DVD player?

    A friend put an European DVD into her iMac computer.  It asked her for a country code.  She entered the European code.  Now she wants it back ti North America.  How does she change it back?

    DVD Player: About DVD-Video Regions
    Region encoding is the mechanism that enables motion picture studios to control the worldwide release of their movies. It is required by the DVD Forum (http://www.dvdforum.org/forum.shtml) in all commercial hardware DVD players. Every DVD-Video disc contains one byte of data representing a region code, which limits where the disc can be played.
    http://support.apple.com/kb/HT2397
    Once you have set the region in DVD Player five times it cannot be changed.
    Instead, use VLC to view videos from different regions:
    http://www.videolan.org/vlc/download-macosx.html

Maybe you are looking for