SELECT Žurnalas.[Operacijos kodas (D)], Sum(Žurnalas.Debetas) AS SumOfDebetas
FROM Žurnalas
GROUP BY Žurnalas.[Operacijos kodas (D)]
HAVING (((Žurnalas.[Operacijos kodas (D)])=123));
thats the "many queries" thingie, all of them look alike, just some details
change, like field names etc.
And this is querie, that i have to see results in (even if i dont enter any
to Žurnalas table, i want to see it as 0)
SELECT [120 (D)].SumOfDebetas, [121 (D)].SumOfDebetas, [123
(D)].SumOfDebetas, [201 (D)].SumOfDebetas, [1237 (K)].SumOfKreditas, [27
(D)].SumOfDebetas, [27 (K)].SumOfKreditas, [201 (K)].SumOfKreditas, [301
(K)].SumOfKreditas, [443 (K)].SumOfKreditas, [443 (D)].SumOfDebetas, [Pelnas
ir nuostolis].SumOfDebetas, [Pelnas ir nuostolis].SumOfKreditas
FROM [120 (D)], [121 (D)], [123 (D)], [201 (D)], [1237 (K)], [27 (D)], [443
(D)], [27 (K)], [201 (K)], [301 (K)], [443 (K)], [Pelnas ir nuostolis];
A really great thanks to you Karl in advance. And thank you for your time
you wasted (on me) already.
KARL DEWEY said:
Post your query SQL. Open in design view, click on VIEW - SQL View,
highlight all, copy, and paste in a post.
--
KARL DEWEY
Build a little - Test a little
:
Hello Karl and thank you for your help. My table name is "Journal" field
names in it "Debetas" and "Kreditas". O tried to apply your example to my
queries, but i got more errors, like "Cannot group with "*"" Tries removing
grouping and summing from queries, but still got errors like "Having clause
Journal(all the names in criteria) without grouping or aggregation".
:
You did not post the table and field names, so substitute them in this --
Some_Alias_Name: IIF([YourFieldName] Is Null, 0, [YourFieldName])
--
KARL DEWEY
Build a little - Test a little
:
Hello, i am rather green to this stuff, so dont laugh if my question is funny.
I got numerous queries, and i need to have all results in 1 query, but some
of my result are Null and when i join up all queries in 1, i see only blank
space. For ex.: i have 2 querie field "120 (D).SumOfDebetas" and "121
(D).SumOfDebetas" one of them contains Null (no data at all on that querie),
but i need to "no data" as "0", how can i do that? Fast answer for greenie
would help ALOT. Thank you in Advance