SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: ASP DB Error

  1. #1
    SitePoint Guru mdumka's Avatar
    Join Date
    Jul 2003
    Location
    True North
    Posts
    642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP DB Error

    Hi There ...

    Using This Query for an Access DB

    SELECT SUM(steps) AS TotalSteps, COUNT(DISTINCT email) AS TotalEmails FROM steps WHERE week = 1

    I get this error ...

    Syntax error (missing operator) in query expression 'COUNT(DISTINCT email)

    Can you have a SUM and COUNT in the Same Query?

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You can't Count(DISTINCT field) . . .

  3. #3
    SitePoint Guru mdumka's Avatar
    Join Date
    Jul 2003
    Location
    True North
    Posts
    642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks ... I just thought I would ask


Bookmarks

Posting Permissions

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