Hi,
I have an update statement. Can u suggest me if it can be optimised so the number of db calls can be reduced. I suppose i can't use updare_recordset in this case (or can I use it?). Is there any other way?
while select forupdate AmountCur,salesPrice from projProposalRevenueDetail
join projProposalRevenue
where projProposalRevenue.RecId == projProposalRevenueDetail.ProposalRefRecId
&& projProposalRevenue.ProposalId == _proposalId
join TotalSalesAmountCur from projRevenueTrans
where projRevenueTrans.TransId == projProposalRevenue.TransId
&& projRevenueTrans.ProjId == _projId
{
projProposalRevenueDetail.AmountCur = (projRevenueTrans.TotalSalesAmountCur/(_totalHrsSalesPrice + totalFeeSalesPrice)) * _Amount;
projProposalRevenueDetail.salesPrice = projProposalRevenueDetail.AmountCur / minOne(projProposalRevenue.Qty());
projProposalRevenueDetail.update();
}
Thanks.
*This post is locked for comments