Hi,
I'm not sure if this is the best place to ask but I have a query I have written in MySQL, and I need to convert it to MSSQL, does anyone have experience of this?
SELECT DATE_FORMAT(DateReported, '%b %Y') AS DateReported, DATE_FORMAT(DateCompleted, '%b %Y') AS DateCompleted, LocationName,
IF(status = 'open', 1, 0) AS open,
IF(status = 'closed', 1, 0) AS closed,
IF(status = 'cancelled', 1, 0) AS cancelled
FROM event
GROUP BY DATE_FORMAT(DateReported, '%b %Y'), LocationName
ORDER BY FIELD(DATE_FORMAT(DateReported, '%M'), 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')