Advanced Querying

SQLServerCentral Article

How many more Mondays until I retire?

  • Article

Depending on your age, you may not want to know this number, but as you advance in your career, this might be a problem that you look to solve one day. Peter Larsson takes a few minutes to work out a function in T-SQL that can be used to solve this or any similar question.

5 (3)

You rated this post out of 5. Change rating

2006-07-19

14,112 reads

SQLServerCentral Article

SQL Sudoko

  • Article

The latest puzzle craze seems to be Sudoko with all kinds of online puzzles, books, etc. appearing around the world. Longtime SQL Server guru David Poole decided solving the puzzles was not enough of a challenge and brings us some T-SQL to help solve those difficult ones keeping you from getting back to work.

2 (1)

You rated this post out of 5. Change rating

2006-06-22

17,648 reads

SQLServerCentral Article

Pivot table for Microsoft SQL Server

  • Article

One of the seeminly more popular enhancements in SQL Server 2005 to T-SQL is the PIVOT operator. There have been quite a few articles, but new author Peter Larsson decomposes in detail how you can perform this operation with previous versions.

4.68 (22)

You rated this post out of 5. Change rating

2007-10-02 (first published: )

75,741 reads

External Article

Counting Parents and Children with Count Distinct

  • Article

The aggregate functions in SQL Server (min, max, sum, count, average, etc.) are great tools for reporting and business analysis. But sometimes, you need to tweak them just a little bit to get exactly the results you need. For example, if your manager came to you and asked for a report on how many sales have been made to your clients and how large they were, would you know how to get the data you need efficiently? Mark ran into something like this recently and here's the approach he took to solve the problem.

2006-01-25

3,507 reads

Blogs

Can You See Who Forced a Plan

By

I had an excellent group of people in Gothenburg Sweden when I taught there...

Monday Monitor Tips–Finding CUs for My Instance

By

How can I quickly get a CU patch for a system that’s out of...

Why Data Analysts Love PostgreSQL (and You Will Too!)

By

Data analysis is all about wrangling massive datasets. To do that efficiently, you need...

Read the latest Blogs

Forums

GIT Configuration and Automated Release for Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item GIT Configuration and Automated Release...

workaround for problems that cant be try caught

By stan

hi a peer of mine recalls an error in an edi app that often...

How to commit transaction log during a large ETL process

By Lord Slaagh

Hello SSC! First, I would like to thank everyone who has responded to my...

Visit the forum

Question of the Day

Trigger Order III

I have created these triggers in SQL Server 2022:

CREATE TRIGGER triggertest_tri_1 ON dbo.triggertest FOR INSERT
AS
PRINT 'one'
GO
CREATE TRIGGER triggertest_tri_2 ON dbo.triggertest FOR INSERT
AS
PRINT 'two'
GO
I want to be sure that the trigger with "1" runs first. I decide to run this:
EXEC sp_settriggerorder@triggername = 'triggertest_tri_1', @order = 'first'
What happens?

See possible answers