J
Jon
1) I need to be able to count the number of records returned by 2
queries (which I can do).
2) Then I need to subtract one count from the other and return that
number. Simple, right? When I try to do this, I get the error 'Query
input must contain at least one table or query'.
Here's the query:
SELECT
( SELECT * FROM [Level 01 Count Distinct Customers During Billing
Period])
-
(SELECT * FROM [Level 01 Count Distinct Customers During Billing
Period Only])
If I execute either of the inner selects, integers are returned as
expected. The funny thing is - if I were to execute 'SELECT (0) -
(1)' , in other words, hard coding integers, the query would return -1
as expected. So why doesn't it work by nesting queries that should
return integers?
queries (which I can do).
2) Then I need to subtract one count from the other and return that
number. Simple, right? When I try to do this, I get the error 'Query
input must contain at least one table or query'.
Here's the query:
SELECT
( SELECT * FROM [Level 01 Count Distinct Customers During Billing
Period])
-
(SELECT * FROM [Level 01 Count Distinct Customers During Billing
Period Only])
If I execute either of the inner selects, integers are returned as
expected. The funny thing is - if I were to execute 'SELECT (0) -
(1)' , in other words, hard coding integers, the query would return -1
as expected. So why doesn't it work by nesting queries that should
return integers?