Link to home
Start Free TrialLog in
Avatar of TWBit
TWBitFlag for United States of America

asked on

TRANSFORM, PIVOT - implement in SQL

Here is my access query:

TRANSFORM Sum(tblBudgetAmount.LocalAmount) AS SumOfFunctionalAmount
SELECT tblBudgetItem.CostCenterID, tblBudgetItem.GL as GL1,tblBudgetItem.ProjectID,
      Sum(tblBudgetAmount.LocalAmount) AS ColumnTotal, tblAcctCode_0.sStatus
FROM tblAcctCode_0
INNER JOIN (tblBudgetItem
INNER JOIN tblBudgetAmount ON tblBudgetItem.ID = tblBudgetAmount.BudItemID)
                  ON tblAcctCode_0.sCodeID = tblBudgetItem.GL
Where tblBudgetItem.CostCenterID ='385' and tblBudgetItem.ProjectID='1537'
      and left(tblBudgetItem.GL,2) like '62' and tblBudgetItem.ActivityID='50770'
      and tblBudgetItem.FundID='10' and tblBudgetAmount.FiscalYear ='2005'
GROUP BY tblBudgetItem.GL, tblBudgetItem.CostCenterID, tblBudgetItem.ProjectID, tblBudgetItem.GL, tblAcctCode_0.sStatus PIVOT tblBudgetItem.FundingSource


How would I go about converting this to SQL?
Avatar of Partha Mandayam
Partha Mandayam
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial