Subject Re: [firebird-support] Re: Copying data from one table to another
Author Kjell Rilbe
Ed Dressel wrote:
> > Insert into PersonInfo (Client_ID, PersonType, PhoneNumber) select
> > Client_ID, 0, PhoneNumber from ClientInfo
>
> Thanks Alexandre--but I need to clarify.
>
> The record in the destination table will already--I just need to move
> the data to the existing record.
>
> I'm thinking I need a stored proc. Right?

update "PersonInfo"
set "PhoneNumber" = (
select "PhoneNumber"
from "ClientInfo"
where "ClientInfo"."Client_ID" = "PersonInfo"."Client_ID"
)
where "PersonType" = 0;

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64