Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.
asifbhura Posting Yak Master
165 Posts
James K Master Smack Fu Yak Hacker
3873 Posts
declare @year int = 2008;declare @month int =3;declare @FirstDayOfTheMonth datetime = dateadd(mm,@month-1,dateadd(yy,@year-1900,0));select * from YourTablewhere invoice_date >= @FirstDayOfTheMonth and invoice_date < dateadd(mm,1,@FirstDayOfTheMonth);
SQLTeam.com Articles via RSS
SQLTeam.com Weblog via RSS
- Advertisement -
Articles
Forums
Blogs
Contact Us
About the Site