Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find rows with inv_dates
Message
From
01/05/2017 13:47:17
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01650725
Message ID:
01650732
Views:
55
>>I have another brain freeze
>>I know the beginning year and month and the ending year and month (all integers)
>>I want to write a query that returns all rows with inv_dates between those months and years.
>>All graciously accepted.
>
>In SQL 2014 and up
>
>select * from Invoices where inv_dates between datefromparts(yearfrom, monthfrom, 1) and eomonth(datefromparts(yearto, monthto,1))

Thank you, Naomi.
I'm using 2012
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform