Hi,
i dont think this is a sql syntax prob as when i execute the query from mysql it runs fine and displays a recordset.
However when i run the query from my asp page it returns eof.
this is because of this part of the statment
i am opening the rs like this
and have tried
the sql looks like
if you have an idea of what i could try next please let me know
i dont think this is a sql syntax prob as when i execute the query from mysql it runs fine and displays a recordset.
However when i run the query from my asp page it returns eof.
this is because of this part of the statment
Code:
sum(TO_DAYS(CBB.bookend) - TO_DAYS(CBB.bookst) + 1) AS holcount
i am opening the rs like this
Code:
Set rsside = Server.CreateObject("ADODB.Recordset")
rsside.Open sqlside, conn
Code:
set rsside = conn.execute(sqlside)
the sql looks like
Code:
SELECT CC.code, sum(TO_DAYS(CBB.bookend) - TO_DAYS(CBB.bookst) + 1) AS holcount, CC.holtype
FROM holtype AS CC
LEFT JOIN (SELECT CB.bookst, CB.bookend, CB.userholid, CB.holbookid, CB.holtypeid, CB.deptid FROM holbook AS CB WHERE CB.userholid = '46'
AND ((cb.bookst BETWEEN '20070101' AND '20071231')
OR (cb.bookend BETWEEN '20070101' AND '20071231')
OR (cb.bookst <= '20070101') AND (cb.bookend
>= '20071231')))
AS CBB ON CC.holtypeid = CBB.holtypeid
GROUP BY CC.holtypeid
ORDER BY CC.holtypeid
if you have an idea of what i could try next please let me know