Skip to content

Query: Qry Budget Spend Totals by Marketing Campaign

Type: Select
Has Parameters: No
Has Joins: No
Has Subquery: No

Tables Referenced

  • Principal
  • Principal Projects
  • Marketing Campaigns
  • Qry Sum Marketing Spend by Campaign

Columns Selected

  • [Marketing Campaigns].[Marketing Campaign ID]
  • IIf(IsNull([Standard Marketing Budget]),0,[Standard Marketing Budget])+IIf(IsNul
  • IIf(IsNull([Total Marketing Spend]),0,[Total Marketing Spend])
  • [Total Project Budget]-[Marketing Spend]

SQL

SELECT [Marketing Campaigns].[Marketing Campaign ID], IIf(IsNull([Standard Marketing Budget]),0,[Standard Marketing Budget])+IIf(IsNul, IIf(IsNull([Total Marketing Spend]),0,[Total Marketing Spend]), [Total Project Budget]-[Marketing Spend] FROM [Principal Projects], [Marketing Campaigns], [Qry Sum Marketing Spend by Campaign]