Results 1 to 7 of 7

Thread: Count Query

  1. #1
    Join Date
    Jul 2005
    Location
    Southampton, UK
    Posts
    7

    Unanswered: Count Query

    Hi,

    I have a very simple but infuriating problem and I hope someone can help me?

    I have a basic count query set up looking at a standard table. The count is returning a value of 131, when there are only 128 records. I don't know if there is something obvious I am missing, but would appreciate any help.

    Thanks
    Paul

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    Please post your SQL

    Cheers
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Any inner joins????
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Jul 2005
    Location
    Southampton, UK
    Posts
    7
    This is the original crosstab query SQL. I have tried a simple select query and the same problem occurs. Also, there are no inner joins.

    PARAMETERS [Forms]![data entry]![Text0] DateTime;
    TRANSFORM Count([import data].[Process id]) AS [The Value]
    SELECT [import data].[Business Area], Count([import data].[Process id]) AS [Total Of Process id]
    FROM [import data]
    WHERE ((([import data].Channel)="Telephone") AND (([import data].[Received Date])=[Forms]![data entry]![Text0]) AND (([import data].[Invoice Number])<>"na" Or ([import data].[Invoice Number]) Is Null))
    GROUP BY [import data].[Business Area]
    PIVOT Format([Received Date],"Short Date");

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi
    What does the below give you?
    Code:
    SELECT TOP 1 (SELECT COUNT([Process id])  FROM [import data]) AS TableCount, (SELECT SUM([The Value]) FROM InsertCrosstabNameHere) AS CrossTabCount FROM [import data]
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Jul 2005
    Location
    Southampton, UK
    Posts
    7
    Quote Originally Posted by pootle flump
    Hi
    What does the below give you?
    Code:
    SELECT TOP 1 (SELECT COUNT([Process id])  FROM [import data]) AS TableCount, (SELECT SUM([The Value]) FROM InsertCrosstabNameHere) AS CrossTabCount FROM [import data]
    Thats great. Thanks for your help.

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by Wildsmeister
    Thats great. Thanks for your help.
    Lol - so what did the query tell you?
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •