Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: Need Help with my sql code

    I think I might have got it

    SELECT userID, SUM(Correct) AS CORRECT, SUM(Wrong) as Wrong, SUM(AssitanceNeeded) AS AssitanceNeeded

    FROM Charts

    where TimeDateStamp between

    dateadd(month, -11, DATEADD(mm, DATEDIFF(mm,0,getdate()), 0))

    and

    dateadd(ss,-1, DATEADD(mm, DATEDIFF(mm,0,getdate()) + 1, 0))

    GROUP...

  • RE: Need Help with my sql code

    antonio.collins (1/26/2008)


    sorry the comparison should be TimeStamp >= date expression

    run these statements:

    select dateadd(month, -12,

    dateadd(day,1 - day(getdate()), ...

  • RE: Need Help with my sql code

    antonio.collins (1/26/2008)


    WHERE TimeDateStamp

    BETWEEN DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)

    AND

    DATEADD(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate()) +1, 0))

    try this instead:

    where TimeDateStamp <=

    dateadd(month, -12,

    dateadd(day,1 - day(getdate()),

    ...

Viewing 3 posts - 1 through 3 (of 3 total)