Thanks for your help! I was still having some problems getting the results I wanted with your suggestions but I was able to figure out a solution. Basically I created temp tables with one row of dummy values so there will always be a result for
select * from temptable1.
I then used...
Sorry about the confusion, nice95gle. I'm fairly new to this so I'm having a hard time explaining it.
Currently I get the following results where status A2(my second query) does not return any data:
Status Male Female ...
A1 1 3
A3 5 0
...
Ultimately I want...
Thanks for the quick reply. I'm trying to run a QA report that shows the status of clients within a Cost Center and then break that down by race and gender. Each query shows a different status. The first two, for example, are active clients that started in the Cost Center prior to a date...
I'm fairly new at SQL so I'm not sure if this is the correct way to write this. I have several queries that I want to join with UNIONs but I also need to run an IF EXISTS on each one first. The way I have it written now is
IF EXISTS(query 1)
BEGIN
query 1
END
ELSE
CREATE TABLE...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.