Results 1 to 4 of 4

Thread: Add 2 for all phone numbers

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Answers
    1

    Add 2 for all phone numbers

    I want a query for the the phone number in the database are like this 47407 and i want add 2 for the all the phone nubmers. it is clear i think i want add one number.


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Add 2 for all phone numbers

    Do u wan to add 2 or concadinate 2 to the existing value ?

    What is the data type of the phone number field in the table ?


  3. #3
    Junior Member
    Join Date
    Jul 2007
    Answers
    6

    Re: Add 2 for all phone numbers

    select to_char('2'||phone) from ;


  4. #4
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    Re: Add 2 for all phone numbers

    I think "sravanvellala" wants to a digit ‘2’ is to be suffixed to the numbers.

    Use this command… to update all rows of the table.

    If it is a text field…
    UPDATE SET = ‘2’ &

    If it is a numeric field…
    UPDATE SET = + 2 * (100000)

    This is for a 5 digit phone number like in ur example 47407.
    I will have to come back to this thread with a generic query for a numeric field.

    Last edited by sutnarcha; 10-01-2007 at 02:53 AM.
    Lack of WILL POWER has caused more failure than
    lack of INTELLIGENCE or ABILITY.

    -sutnarcha-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact