|Subject||Re: [firebird-support] How to fill detail table with record secuence into master table|
set term #;
declare m_mId char(10); -- type of master_id
declare m_dId integer; -- type of detail_id
for select distinct master_id
update detail set detail_id=:m_dId
set term ;#
On Saturday, January 23, 2016 1:37 AM, "duque.hernando@... [firebird-support]" <firstname.lastname@example.org> wrote:
Hi to all,
I have two tables with a master detail relation.
The detail table has the fields "id", "master_id" and "detail_id".
I need to fill the "detail_id" field with a sequence from 1 to n for each record in the master table.
I can't figure out how to do this.
Any help will be appreciated.