Please Check the SQL Reference: The Add_Months and Last_Day scalar
Mit freundlichen Grüßen / Best regards
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
Von: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von
Gesendet: Thursday, 22.10 2015 17:57
An: Midrange Systems Technical Discussion
Betreff: Need simple SQL to get the last day of month of previous month
HI this code is not working on i.
select DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1, -1)
error Message: Token <END-OF-STATEMENT> was not valid. Valid tokens: + - AS
What would be the syntax for such a select statement?
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l