Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    32

    Unanswered: SQL with Access DB

    I have this string:

    SELECT *,
    IIF(outcome='win',2,1) AS points FROM Results
    WHERE name='Bam'

    What I need to do now, in this string, is have it total the rows in the points column that I have created in the statement. I tried this:

    SELECT *,
    IIF(outcome='win',2,1) AS points FROM Results
    WHERE name='Bam'
    SUM points AS points2

    But it didn't work. Everyting I tried didn't work. Can someone help me with this please?
    Bam

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    select sum(IIF(outcome='win',2,1)) as totalpoints
    FROM Results
    WHERE name='Bam'

    rudy

  3. #3
    Join Date
    Jan 2003
    Posts
    32

    Talking

    Thank you so much for that!

Posting Permissions

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