qryStr = " INSERT INTO jpFlatsCardRateComponentsTemp(siteID, flatNo, CardArea, cardRate, cardAmt, schArea, schRate, schAmt, compRate, uID) ";
qryStr += " SELECT siteID, flatNo ";
qryStr += " , SUM(case when compCode='CR' then componentArea end)CardArea ";
qryStr += " , SUM(case when compCode='CR' then componentRate end)cardRate ";
qryStr += " , SUM(case when compCode='CR' then componentAmt end)cardAmt ";
qryStr += " , SUM(case when compCode='SR' then componentArea end)schArea ";
qryStr += " , SUM(case when compCode='SR' then componentRate end)schRate ";
qryStr += " , SUM(case when compCode='SR' then componentAmt end)schAmt ";
qryStr += " , SUM(case when compCode<>'CR' AND compCode<>'SR' then componentRate end)compRate ";
qryStr += " , '" + Request.Form.Get("fUID") + "' ";
qryStr += " FROM jpFlatsCardRateComponents ";
qryStr += " WHERE siteID='" + Request.Form.Get("fSiteName") + "' ";
qryStr += " Group by siteID, flatNo ";
Tuesday, February 16
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment