Results 1 to 2 of 2

Thread: PHONE NUMBERS UPDATE

  1. #1
    Marshall Guest

    PHONE NUMBERS UPDATE


    I am trying to update a table call "SALES".
    The column name is call "PHONE"
    The phone numbers are in these formate==> (AAA)BBB - CCCC
    (AAA) is the area code.
    BBB is the set of numbers following the area code.
    CCCC represent the last four numbers.

    I need to update the BBB to ZZZ in order for my phone number to look like this
    (AAA) - ZZZ-CCCC

    Please help.

  2. #2
    Chris Thibodeaux Guest

    PHONE NUMBERS UPDATE (reply)

    UPDATE t
    SET Phone = SUBSTRING(Phone, 1, 5)+'ZZZ'+SUBSTRING(Phone, 9, 6)
    WHERE SUBSTRING(Phone, 6, 3) = 'BBB'

    - HTH -
    ------------
    Marshall at 8/16/01 8:42:17 PM


    I am trying to update a table call "SALES".
    The column name is call "PHONE"
    The phone numbers are in these formate==> (AAA)BBB - CCCC
    (AAA) is the area code.
    BBB is the set of numbers following the area code.
    CCCC represent the last four numbers.

    I need to update the BBB to ZZZ in order for my phone number to look like this
    (AAA) - ZZZ-CCCC

    Please help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •