This is pretty useful when you need to get data from the past n months:
SELECT CAST(((convert(varchar(7),getdate(),121))+'-01') AS datetime)
Subscribe to:
Post Comments (Atom)
Here you'll find solutions to random problems you may encounter whilst programming or using certain software tools (SSIS, Reporting Services, SharePoint, Business Objects, etc...)
No comments:
Post a Comment