Scripts

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: )

324 reads

Technical Article

IsDateAHoliday UDF

This is a User Defined Function that returns a 1 if date is a holiday else, it returns a 0.The holidays are:New years Day, MLK Day, Presidents Day, Memorial Day, Independance Day, Labor Day, Columbus Day, Veterans Day, Christmas Eve and Christmas Day

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2005-06-13 (first published: )

309 reads

Blogs

Architecting Zero Downtime Deployments–Day of Data Boston

By

Here are the resources for my talk at Day of Data Boston. Slides –...

The Book of Redgate:A Prehistory

By

I’ve covered the values in a number of previous posts on the Book of...

Evidence-bound: what AgentDBA will and won’t link

By

When the evidence names the database, it says so. When it doesn’t, it stops....

Read the latest Blogs

Forums

SQL Server Storage Optimization: Multiple Files in a Filegroup vs Dedicated File

By abdalah.mehdoini

Hello, I would like to get some feedback regarding the best storage optimization strategy...

Azure SQL Database Event Log Limitations

By abdalah.mehdoini

Hi, Do you know if there is a way to get more detailed logging...

Four Rules for Adding AI Without Breaking What Already Works

By dbakevlar

Comments posted to this topic are about the item Four Rules for Adding AI...

Visit the forum

Question of the Day

Hyperscale Replicas III

In an Azure SQL Database Hyperscale Edition, how many named replicas can be configured?

See possible answers