Technical Article

Return WeekNo (ISO 8601 standard)

In MS SQL, January 1 of any year defines the starting number for the week. The DATEPART(wk, 'Jan 1, xxxx') always return 1. However, a lot of reports Week No is actually based on ISO 8601 standard, that is January 1 of any year can be Week 53/52 or Week 1. (http://www.merlyn.demon.co.uk/weekinfo.htm#IDC)The Rule is as […]

You rated this post out of 5. Change rating

2005-06-14 (first published: )

288 reads

Blogs

March 2025 SQL Challenge: Test Your Skills with Advanced SQL Scenarios

By

If you’re an experienced SQL user eager to sharpen your expertise with real-world challenges,...

SQL Saturday Atlanta BI Recap

By

https://sqlsaturday.com/2025-03-08-sqlsaturday1102/#schedule SQL Saturday Atlanta BI is one of my favorite SQL Saturdays of the...

Mistakes IT Shops Without a DBA Make

By

We get it. There’s no budget for a DBA on staff, or even a...

Read the latest Blogs

Forums

Dynamic T-SQL Script Parameterization Using Python

By omu

Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...

SQL 2017 server keeps locking up

By karenhallard

I manage a two-node production SQL cluster running SQL Server 2017 CU31 on Windows...

Alternatiives to Junk Dimensions

By Lord Slaagh

Hello SSC, I am not sure if I posted this in the right spot,...

Visit the forum

Question of the Day

Partial Backups II

What is a partial backup for a read-write database?

See possible answers