SQL Series 1000040

Post the Allocated Costs for the Current Period

Each SQL Script returns the Total Allocated Cost for each Scheme Record that have been allocated to the target Invoice Period.  The returned record set must include the Target GUID Identifier as the first column field.

A separate SQL is used for each Class of Allocation Cost, with conditions being applied to define the target Scheme Class, and Works Stage (for Staff Time).

The SQL Script gives the Target Field Name on returned columns.

 

SQL Identifier

Notes and Comments

SQL 1000040 - 1

Totals Scheme Costs To Date for N1 From Staff, Labour, Plant, Materials, PL Materials, SubContract.  Only Schemes with Costs in Period and for Schemes Works Stage Cost Class = MSST (4).

SQL 1000040 - 1

SQL 1000040 - 2

Totals Scheme Costs To Date for N2 From Staff, Labour, Plant, Materials, PL Materials, SubContract.  Only Schemes with Costs in Period and for Schemes Works Stage Cost Class = MSDE (5).

SQL 1000040 - 2

SQL 1000040 - 3

Totals Scheme Costs To Date for N3 From Staff, Labour, Plant, Materials, PL Materials, SubContract.  Only Schemes with Costs in Period and for Schemes Works Stage Cost Class = MSRC (7).

SQL 1000040 - 3

SQL 1000040 - 4

Totals Scheme Costs To Date for N4 (Base) From Staff, Labour, Plant, Materials, PL Materials, SubContract.  Only Schemes with Costs in Period and for Schemes Works Stage Cost Class = MSWK (6).

SQL 1000040 - 4

SQL 1000040 - 5

Totals Scheme Costs To Date for N4 (Other) From Staff, Labour, Plant, Materials, PL Materials, SubContract.  Only Schemes with Costs in Period and for Schemes Works Stage Cost Class = MCMP (11).

SQL 100040 - 5

SQL 1000040 - 6

Set the Final Account Cost in to PCCostN4Base for schemes that have been final accounted - and are schemes subject to Pain / Gain.  This overrides the Costs taken from the standard live Cost Tables.

SQL 1000040 - 6

SQL 1000040 - 7

Totals Scheme Costs To Date for N4 (Other) From Staff, Labour, Plant, Materials, PL Materials, SubContract.  Only Schemes with Costs in Period and for Schemes Works Stage Cost Class = MCMF (12).

SQL 1000040 - 7