Question
Sorting Dates in CF Report SQL
I'm having trouble sorting my data by ticketDate because the
data is stored in two different formats:
- Database has allowed entries in both mm-dd-yyyy and mm-d-yyyy
How do I get my SQL query in CF Report writer to Sort the ticketDate correctly?
- Currently it is doing the following:
09-11-2007
09-2-2007
09-3-2007
09-4-2007
Here is my SQL:
----------------------
SELECT ticketDate, Count(tickets.ticketDate) as CountTickets
FROM tickets
WHERE (ticketType LIKE 'TS%')
GROUP BY ticketDate;
I think need to force the mm-d-yyyy data to mm-dd-yyyy then query the data but do not know how..?
(The ticketDate is stored in MySQL as a VarChar, not a Date)
Thanks,
jlig
- Database has allowed entries in both mm-dd-yyyy and mm-d-yyyy
How do I get my SQL query in CF Report writer to Sort the ticketDate correctly?
- Currently it is doing the following:
09-11-2007
09-2-2007
09-3-2007
09-4-2007
Here is my SQL:
----------------------
SELECT ticketDate, Count(tickets.ticketDate) as CountTickets
FROM tickets
WHERE (ticketType LIKE 'TS%')
GROUP BY ticketDate;
I think need to force the mm-d-yyyy data to mm-dd-yyyy then query the data but do not know how..?
(The ticketDate is stored in MySQL as a VarChar, not a Date)
Thanks,
jlig
