Re: Please help!
- From: "AccessHelp" <AccessHelp@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 16 Nov 2005 09:40:14 -0800
Hi Chris2,
Thanks for your response. These are what I did. I ran the SQL query in the
Database view with or without "Totals" (In a query, if you do the "Totals",
you group all the text fields and sum all the numeric fields together). Then
I copy all the numbers from "Total Accum Time" for both with or without
"Totals" into Excel and added them.
The sum of numbers for both with or without "Totals" didn't come up the
same. I thought the sum of those numbers would be the same with or without
the "Totals" in a query. The "Totals" is pretty much grouped all the similar
text fields together and sum all the numeric fields of the similar text
fields?
Thanks again.
"Chris2" wrote:
>
> "AccessHelp" <AccessHelp@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:E9367F3B-F5AD-4CA2-B73C-48B2BCA5EE41@xxxxxxxxxxxxxxxx
> > Hello,
> >
> > I posted the same tread yesterday. Please help. I need to know
> what is
> > causing to happen.
> >
> > I have a report to run a list of clients that we have not billed
> invoices
> > for. The Control Source of the report is a SQL query, and the SQL
> query is
> > pulling the info from a Select query that I created.
> >
> > The problem is when I do the "Totals" on the SQL query and run it
> in the
> > Data*** View, the sum of the "Total Accum Time" (the $ amount
> for the time
> > that we spend on a client) is not the same as without doing the
> "Totals" on
> > the SQL query. Does anyone know what causes to happen? Shouldn't
> the sum be
> > the same with or without the "Totals" the SQL query? It appears
> to me that
> > they are not pulling the same transactions.
>
> AccessHelp,
>
> 1) "the sum of the "Total Accum Time" (the $ amount for the time
> that we spend on a client)"
>
> 2) "is not the same as without doing the "Totals" on the SQL query."
>
> Please forgive my obtuseness, but I'm curious how you get a "sum"
> without doing a "totals" on the SQL query.
>
> I mean, SUM([Total Accum Time]) is going to be one number.
>
> If SUM([Total Accum Time]) is not done, then why would you expect
> the same number, and why would it matter if it was different (since
> it wouldn't be the SUM)?
>
> Did you independently add up the [Total Accum Time] column to
> determine its sum, and then find that the SUM([Total Accum Time])
> was different than the independently calculated sum? Am I just mad
> because I don't understand (anyone feel free to hop in here and tell
> me)?
>
>
> Although meant for an sqlserver newsgroup, the
> following link is still applicable for MS Access:
> http://www.aspfaq.com/etiquette.asp?id=5006, and
> is excellent when it comes to detailing how to
> provide the information that will best enable
> others to answer your questions.
>
> 1) Post your Visual Basic DIMs and SETs for the ADO objects, the
> connection string (with fake UID and PWD, of course!), the
> instantiation of any recordsets, and key processing code.
>
> 2) Read the above link, and post a tables description. If you can
> write the DDL, that would be great, because then I won't have to.
>
> 3) Post sample data (including parameter values). Some INSERT INTO
> <table> SELECT col1, col2 UNION scripts would be great, too.
>
> 4) Post the expected results.
>
> 5) Post the wrong results you are getting so I can see how it
> differs from the expected results (and so I can execute your query
> to get the wrong results myself).
>
>
> Barring that, my best advice is simplification. Strip the query
> down until it only operates on the column in question. Create a
> test table with a very limited number of rows where you can see, by
> Mark I eyeball alone, what the SUM of the column is. Point the
> simplified query at the test table, and run it, and see if the
> results match or don't match your expectations.
>
>
> Sincerely,
>
> Chris O.
>
>
>
.
- Follow-Ups:
- Re: Please help!
- From: Chris2
- Re: Please help!
- References:
- Re: Please help!
- From: Chris2
- Re: Please help!
- Prev by Date: Re: Huge Database - Need help with query please
- Next by Date: Populate text box based on entry in another text box
- Previous by thread: Re: Please help!
- Next by thread: Re: Please help!
- Index(es):