Subject | Re: [ib-support] Still have problems updating many-to-many in SP |
---|---|
Author | SD@topol.udm.net |
Post date | 2002-03-18T03:55:25Z |
On 15 Mar 2002 at 8:08, Alan J Davies wrote:
Create procedure AssignNewNumbers AS
Declare variable AAcno VarChar(10);
Declare variable AInv_Number Integer;
begin
For select Acno, Inv_Nmbr From InvHead
Where InvHead.Delivered='N' into :AAcno, :AInv_Number DO
Update DelItems set Inv_Number=:AInv_Number
Where Acno=:Acno and Delivered='N';
end#
This procedure works exactly as yor Delphi "cheat", but
I'm afraid that that is not what you really need.
SY, Dimitry Sibiryakov.
>Update DelitemsTry this:
>Set Inv_Nmbr=(Select InvHead.Inv_Nmbr From InvHead
>Inner Join DelItems DI on DI.Acno=InvHead.Acno
>Where DI.Delivered='N'
>And InvHead.Delivered='N')
Create procedure AssignNewNumbers AS
Declare variable AAcno VarChar(10);
Declare variable AInv_Number Integer;
begin
For select Acno, Inv_Nmbr From InvHead
Where InvHead.Delivered='N' into :AAcno, :AInv_Number DO
Update DelItems set Inv_Number=:AInv_Number
Where Acno=:Acno and Delivered='N';
end#
This procedure works exactly as yor Delphi "cheat", but
I'm afraid that that is not what you really need.
SY, Dimitry Sibiryakov.