techonsite
MIS
Hello,
I'm new to Access. I have 5 queries linked together by a table to come up with a consolidated result.
I get the following results (I've made to modifications so it'll be easier to follow onscreen).
If I do not want to show COMCT since it has all Zeros in the column values, how would I go about doing that? I'm not too familiar with SQL. Thanks in advance.
SourceX AX BX CX DX EX
BARON 0 55 0 123 0
CABLE 2 0 -1135 0 0
COMCT 0 0 0 0 0
Sample SQL code:
SELECT Source.csource, [Query1].CountOfcsource, [Query2].CountOfcsource, [Query3].SumOfntotal, [Query4].CountOfMinOfdsold, [Query5].SumOfntotal
FROM [Query2] RIGHT JOIN ([Query5] RIGHT JOIN ([Query4] RIGHT JOIN ([Query1] RIGHT JOIN ([Query3] RIGHT JOIN Source ON [Query3].csource = Table1.csource) ON [Query1].csource = Table1.csource) ON [Query4].csource = Table1.csource) ON [Query5].csource = Table1.csource) ON [Query2].csource = Table1.csource
GROUP BY Table1.csource, [Query1].CountOfcsource, [Query2].CountOfcsource, [Query3].SumOfntotal, [Query4].CountOfMinOfdsold, [Query5].SumOfntotal;
I'm new to Access. I have 5 queries linked together by a table to come up with a consolidated result.
I get the following results (I've made to modifications so it'll be easier to follow onscreen).
If I do not want to show COMCT since it has all Zeros in the column values, how would I go about doing that? I'm not too familiar with SQL. Thanks in advance.
SourceX AX BX CX DX EX
BARON 0 55 0 123 0
CABLE 2 0 -1135 0 0
COMCT 0 0 0 0 0
Sample SQL code:
SELECT Source.csource, [Query1].CountOfcsource, [Query2].CountOfcsource, [Query3].SumOfntotal, [Query4].CountOfMinOfdsold, [Query5].SumOfntotal
FROM [Query2] RIGHT JOIN ([Query5] RIGHT JOIN ([Query4] RIGHT JOIN ([Query1] RIGHT JOIN ([Query3] RIGHT JOIN Source ON [Query3].csource = Table1.csource) ON [Query1].csource = Table1.csource) ON [Query4].csource = Table1.csource) ON [Query5].csource = Table1.csource) ON [Query2].csource = Table1.csource
GROUP BY Table1.csource, [Query1].CountOfcsource, [Query2].CountOfcsource, [Query3].SumOfntotal, [Query4].CountOfMinOfdsold, [Query5].SumOfntotal;