Hi there,
select purchTable order by RecId desc
join PurchLine order by RecId desc
where PurchLine.PurchId == purchTable.PurchId
join Replacement order by RecId desc
where Replacement.ItemNumber == PurchLine.ItemId;
{
ttsbegin;
select forupdate Replacement
where Replacement.ItemNumber == PurchLine.ItemId;
Replacement.PONumber = purchTable.PurchId;
Replacement.APGSupplier = purchTable.PurchName;
Replacement.update();
ttscommit;
}
I have written this query to select latest record in purchtable form and to get it's item number, if that item number matches with item number in latest record of replacement form i need to insert that purchid and purchname in my replacement table record.
while debugging values are assigning but when i open my form those are not inserted even i checked in SQL in table also they are not inserting
i have written this in form datasource active() method.
please help me with this.