Chris Kavanagh wrote:
My ColdFusion server tells me I have an error in my query syntax, but I can't work out what it is - because I'm working with code that someone very kindly gave me and I only have a vague idea of what the first line's doing! Can anyone see the problem here?

SELECT DATEDIFF(leadtime_type, GETDATE(), deadline)'Difference',
tasks.leadtime,
tasks.lead_time_type_id,
leadtime_type.leadtime_type
FROM tasks
JOIN leadtime_type ON tasks.lead_time_type_id = leadtime_type.leadtime_type_id

It would be helpfll if you told us what error message you got, and what version of MySQL you are using.


The only obvious error I can spot is GETDATE(), this is not a standard MySQL function. Try CURDATE().

--
Roger


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to