Hi,
I'm a relative newbie on the SQL front and as such I'd be grateful if someone could give me a few pointers on the following queries. I've pulled together the following query but I'd like to tweak it to achieve the following:
SELECT [FinancialYear]
,[EvidencedSpend]
,[Role Category]
,RTRIM([Role Classification]) AS 'Role Classification'
,[Unit of Purchase]
,[No of Chargeable Days/Hours]
,[Price per Unit]
,[Temporary Worker pay Rate ]
,[Supplier Fee Percentage Applied if applicable ]
,[Supplier Fee Charged Per Day £]
,[Management Fee Charged Per Hour / Day £]
,[Expenses/Disbursements]
FROM [MISO_Views].[mi].[MI_RMXXX]
WHERE FinancialYear IN ('2015/16','2016/17','2017/18') AND NOT LotNumber = '0'
- Return the 'Evidenced spend' field as 2 d.p.
- Insert a calculated field so that if the 'Unit of Purchase' = 'Hour' it returns 8 * 'Price per unit' field otherwise return what is in the 'Price per unit' field which will be the day rate.
- One of the categories in the 'Role Category' field is listed twice because for one of the financial years it is input as "Finance, Audit & Accountancy" whereas in the other FY's it is 'Finance, Audit & Accountancy' (no speech bubbles). Is it possible to cleanse the data in this field so that the speech bubbles are omitted?
Thanks in advance,
Snook
Bookmarks