Re: UPDATE command HELP!!

From: Dan Maas <recurve2_at_altavista.com>
Date: Fri, 3 Dec 1999 12:02:52 -0800
Message-ID: <8297ie$so0$1_at_inet16.us.oracle.com>


Vic-

UPDATE customer SET acusno = (
  SELECT phone
  FROM cusaddress
  WHERE cusno = customer.cusno)
WHERE acusno IS NULL;

Leave out the WHERE acusno IS NULL if you want to set each acusno to its corresponding phone value from cusaddress.

--
                                          -Dan
____________________________________________________________


Vic Millan <vmillan_at_dailyherald.com> wrote in message
news:3847ee67.6905030_at_news.alterdial.uu.net...

> I have two table, CUSTOMER and CUSADDRESS.
> In the CUSTOMER table, I have a field called ACUSNO.
> Some data in CUSTOMER table has blank ACUSNO.
> I want to populate ACUSNO with a filed in CUSADDRESS called PHONE.
> The key for both tables is CUSNO.
>
> What is the correct syntax when I run UPDATE command??
>
> Vic
>
Received on Fri Dec 03 1999 - 21:02:52 CET

Original text of this message