Subject | RE: [IBO] duplicate a record including children |
---|---|
Author | Jason Wharton |
Post date | 2008-05-11T23:26:45Z |
Jeff,
this:
INSERT INTO <table> ( <field list> )
select ( <field list with new parent ID> )
from <table>
where <clause selecting records with old parent ID>
HTH,
Jason Wharton
> I use this method to duplicate a record with no problems:Take the old parent ID and the new parent ID and then do something like
>
> srcVariant := ib_query1['COL1;COL2;COL3'];
> ib_query1.append;
> ib_query1['COL1;COL2;COL3'] := srcVariant;
>
> How do I extend this code so that I can copy or duplicate the details
> in a master-detail structure?
this:
INSERT INTO <table> ( <field list> )
select ( <field list with new parent ID> )
from <table>
where <clause selecting records with old parent ID>
HTH,
Jason Wharton