Skip to content

Instantly share code, notes, and snippets.

@dinnouti
Created March 20, 2013 13:05
Show Gist options
  • Save dinnouti/5204483 to your computer and use it in GitHub Desktop.
Save dinnouti/5204483 to your computer and use it in GitHub Desktop.
bring empty records in a report builder query
-- lookup query
select
-1 as country_work_impact_id,
'[any]' as country_work_impact_name
union all
SELECT DISTINCT
country_work_impact_id,
country_work_impact_name
FROM V_Matrix_FY14_Aggregate
WHERE
country_work_impact_name is not null
ORDER BY
country_work_impact_name
-- main sql query filter
-- select ... from ... where
AND (
- 1 IN (@country_work_impact)
OR country_work_impact_id IN (@country_work_impact)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment