I have a articles table that has a Expires column of type datetime.
How can I list all articles that will expire in the next month?
Attachments: Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.
SELECT * FROM Table1
WHERE Expires >= dateadd(month, 1 + datediff(month, 0, getdate()), 0)
AND Expires < dateadd(month, 2 + datediff(month, 0, getdate()), 0)
No one has followed this question yet.
Count of combinations
query to find when a value changes from one row to the next?
Removing white spaces to export to CSV
NEED HELP WITH QUERIES PLEASE!
creating summary out of 5 tables