Below is the current code that I am using to return certain data. In this case, the data does not exist. The task at hand is to return 12 rows for every geographical area. The 12 rows are based on the indcode. For some of these geographical areas (area='000009'), there will be no data and that's ok but the report where the results from SQL will end up needs to have this lack of data noted. When I run a code for all 12 indcodes, it returns 7 rows because 5 have no data.
I can deduce which indcodes have no data but that takes time that I would like to spend on other tasks. the question is how to modify the code that I have been using so that it returns a value of -1 for the rows that have no data?
select
CASE
WHEN suppress = 0 then isnull (mnth1emp, 0)
ELSE '-1'
END as mnth1emp,
CASE
WHEN suppress = 0 THEN isnull (mnth2emp, 0)
ELSE '-1'
END as...