Technical Article

Get Number of Days in month

Have seen existing scripts to work out number of days in month. They tend to work out the month, and then whether it's a leap year.Another approach is to take the date passed in, find the first day of the next month, and then use Datadd to take off one day, ie: last day of […]

4 (1)

2002-10-17

395 reads

Blogs

Tales From The Field Weekly Wrap Up for the Week of 01-31-2023

By

 Hello Dear Reader!  After a weekend with a lot of activities, it was a...

Creating a Flyway Desktop Shadow Database in PostgreSQL

By

In order to generate migrations, we need to configure Flyway to use a shadow...

Daily Coping 6 Feb 2023

By

Today’s coping tip is to get back in contact with an old friend. This...

Read the latest Blogs

Forums

Extended Events shows each SQL command in one long line

By SQL Guy 1

Hi all, I created Extended Events session to capture sql_batch_completed for duration>5 sec sending...

Group by issue

By pedroccamara

Hello everyone!! I have this SQL statement: SELECT dateadd(year,(2023 - year(DH.DOC_DATE)),DH.DOC_DATE) AS 'Date', DD.STORE_CODE...

Ownership chaining

By Duncan Lawrence

Hi, I have four views on one database to which one sql authenticated user...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers