hi,
tested my sql to get the results i need, put it in a recordset and now im want to put it in an array using get rows.
but i get the following error
it worked fine until i added this line to my sql
full sql
the sql runs fine on its own - is this an sql or asp issue
any ideas welcome
tested my sql to get the results i need, put it in a recordset and now im want to put it in an array using get rows.
but i get the following error
Code:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Program type out of range
it worked fine until i added this line to my sql
Code:
sum(datediff(cbb.bookend,cbb.bookst)) as days
full sql
Code:
SELECT CC.reg, CBB.bookst, CBB.bookend, CC.carid, CBB.courtcarbookid,tran.trandesc, CC.model, sum(datediff(cbb.bookend,cbb.bookst)) as days
FROM courtcar AS CC
LEFT JOIN (SELECT CB.bookst, CB.bookend, CB.carid, CB.courtcarbookid, CB.cusid FROM courtcarbook AS CB
WHERE (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.carid = CBB.carid
LEFT JOIN tran ON CC.tranid = tran.tranid
LEFT JOIN cus ON cus.cusid = CBB.cusid
WHERE display = 0
GROUP BY CC.carid, month(cbb.bookst)
ORDER BY CC.carid ASC, CC.makeid ASC, CBB.bookst ASC
the sql runs fine on its own - is this an sql or asp issue
any ideas welcome