Results 1 to 3 of 3

Thread: HELLLPPPP Aggregated Function

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177

    HELLLPPPP Aggregated Function

    Hello,

    I have a SQL statement that Counts an nVarChar variable(COUNT(dboME.Name AS NumUsers)). I am trying to find the Sum of the results (NumUsers). Can any one point me in the right direction?
    212 will lead you to the truth

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Not much information to go on but something like this

    Select Count(dboME.[Name]) As NumUsers From dboME

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177
    Sorry here's the solution:
    SELECT SUM(NumUsers) AS TotalUsers
    FROM
    (SELECT COUNT(dboMe.Name) AS NumUsers
    FROM ...
    GROUP BY ...) AS UserCount
    212 will lead you to the truth

Posting Permissions

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



Click Here to Expand Forum to Full Width