Recent content by bstineman

  1. B

    need help with an aggregate function in a SQL where clause

    PERFECTLY! Thank you so very much.
  2. B

    need help with an aggregate function in a SQL where clause

    Bear with me, I suck at doing subqueiries and need a bit of help. I want to do: Select SUM(mycount),item_id FROM mytable WHERE SUM(mycount)>10 AND DATEDIFF(day,datestamp,GETDATE())<=30 GROUP BY item_id This of course fails with an error like the follow: An aggregate may not appear in the...