Hi! I am working on a query I need to run monthly. This query includes a "date" field which I need to fill in with the LAST day of the PREVIOUS month of this year. I am trying to do this by: SELECT ([31/] + MONTH(DATEADD(mm,-1,DATE())) + '[/]' + YEAR(DATE())) as MyTime
But it tells me that "there are too few parameters". Also, this is not a very good solution since not every month has 31 days. I would very much appreciate any ideas you cane give me. And thanks in advance for you time!
Hi Wetty, So I tried the statement just as you posted it but it gives me an error saying the there is a syntax error(missing operator) in query expression. Is the syntax for MySQL the same as for TOAD for Data Analyst? Thank you