Locked in side a tiny room with a keyboard and many monitors glowing away in the dark...
Unanswered: Conversion Error
I am working in SQL Server 2005 Reporting Services, and am getting a conversion error:
"Conversion failed when converting datetime from character string"
This is the query:
SELECT dataid, hazclass, jurisdictions, hazardlist, incidentdate, regteamsresponding, hazmat_off, txtOther, globalid, DATEPART(mm, entrydate) AS month, DATEPART(yy, entrydate) AS year
WHERE (globalid IS NOT NULL) AND entrydate IN(@month, 'month') AND entrydate IN(@year, 'year')
ORDER BY dataid
SELECT DISTINCT DATEPART(mm, entrydate) AS month
ORDER BY month
SELECT DISTINCT DATEPART(yy, entrydate) AS year
ORDER BY year
If I drop one of the parameters I get a similar error. But need to have both for the report. Any ideas Gurus? I'm new to this and haven't figured out all the quirks or I have too many and SSRS doesn't, ummmm.....
Torchwood "understand, in a sick and twisted sort of way?"