/* Telmax Calls */ UPDATE tDataCollection SET GSTAmount = GSTrate.GSTAmt, AmountIncGST = GSTrate.AmtExGST + GSTrate.GSTAmt, GSTflag = GSTrate.GSTFlg FROM (SELECT tDataCollection.ID, tDataCollection.AmountExGST, (tDataCollection.AmountExGST * 0.1000) AS GSTAmt, 'Y' AS GSTflg FROM (tDataCollection LEFT JOIN tServiceID ON tDataCollection.ServiceID = tServiceID.ServiceID) LEFT JOIN tServiceType ON tServiceID.ServiceTypeID = tServiceType.ID WHERE tDataCollection.BatchID = 20001 AND tServiceType.Code LIKE 'TQ') AS GSTrate WHERE tDataCollection.ID = GSTrate.ID