I have this ver difficult sql statement that I am not sure how to format properly so it works in a asp page. If you could please let me know what I need to do that would be great!<BR><BR>SELECT DISTINCTROW PrintLog.ServerName, PrintLog.PrinterName, Sum(PrintLog.PagesPrinted) AS [Sum Of PagesPrinted], Count(*) AS [Count Of PrintLog] FROM PrintLog GROUP BY PrintLog.ServerName, PrintLog.PrinterName HAVING (((First(PrintLog.Date)) Between [Start Date:] And [End Date:])) ORDER BY Sum(PrintLog.PagesPrinted);<BR><BR>The Database is named PrintLog, and the table I am trying to query is also named PrintLog.