Query: Qry Report SDM Opal Shift
Type: Select
Has Parameters: No
Has Joins: No
Has Subquery: No
Tables Referenced
- SubQry Rpt SDM Opal Shift Get Principals
- SubQry Rpt SDM Opal Shift Sum Previous Month Spend by Principal
- SubQry Rpt SDM Opal Shift Sum Current Month Spend by Principal
- SubQry
Columns Selected
- [SubQry Rpt SDM Opal Shift Get Principals].[Principal ID]
- Principal
- [SubQry Rpt SDM Opal Shift Sum Previous Month Spend by Principal].[Submission Mo
- IIf(IsNull([Previous Principal Spend]),0,[Previous Principal Spend])
- [SubQry Rpt SDM Opal Shift Sum Current Month Spend by Principal].[Submission Mon
- IIf(IsNull([Current Principal Spend]),0,[Current Principal Spend])
- [Current Spend]-[Previous Spend]
SQL
SELECT [SubQry Rpt SDM Opal Shift Get Principals].[Principal ID], [SubQry Rpt SDM Opal Shift Get Principals].Principal, [SubQry Rpt SDM Opal Shift Sum Previous Month Spend by Principal].[Submission Mo, IIf(IsNull([Previous Principal Spend]),0,[Previous Principal Spend]), [SubQry Rpt SDM Opal Shift Sum Current Month Spend by Principal].[Submission Mon, IIf(IsNull([Current Principal Spend]),0,[Current Principal Spend]), [Current Spend]-[Previous Spend] FROM [SubQry Rpt SDM Opal Shift Get Principals], [SubQry Rpt SDM Opal Shift Sum Current Month Spend by Principal], [SubQry Rpt SDM Opal Shift Sum Previous Month Spend by Principal]