Subject | Re: [firebird-support] Copy a record |
---|---|
Author | Bill Katelis |
Post date | 2003-11-13T23:26:15Z |
Michael,
how about:
delete the one you are copying to and then insert into.
eg.
delete from Mytabel where MachineID = ...;
insert into Mytabel select * from Mytabel where MachineID = :PMachineID;
bill
Michael Vilhelmsen wrote:
how about:
delete the one you are copying to and then insert into.
eg.
delete from Mytabel where MachineID = ...;
insert into Mytabel select * from Mytabel where MachineID = :PMachineID;
bill
Michael Vilhelmsen wrote:
>Hi
>
>Can I in a easy way copy an entire record in a table into another one
>in the same table ?
>
>I.e.
>I have a table with some user information in.
>The first field is a unike machine ID.
>The rest is some integer values.
>So far I have some 35+ fields.
>Every once in a while I add a field or delete a field from the record.
>
>My user has the option to copy one machines settings to his settings.
>I have written a SQL like:
>
>Update MyTabel set (
> MyF1 = :PMyF1,
> MyF2 = :PMyF3,
> MyF3 = :PMyF4
> etc
>where
> MachineID = :PMachineID
>
>But everytime I add Or delete a field I have to remember to edit this
>sql. Which I often forget !
>
>So can I in an easy way update an entire record with values from one
>record to another except 1 field ?
>
>Michael
>
>
>
>
>
>
>To unsubscribe from this group, send an email to:
>firebird-support-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>