SQLServerCentral Editorial

Unstuck

Have you ever been stuck in some area of your life? Maybe at work? That big project. Progressing in your career. The slow query that seems impossible to make faster. Learning new skills to switch careers. Maybe outside of work? The weekend home project that’s been going on for more than a few weekends… possibly […]

External Article

Bad Data and Dirty Databases

Many years ago, my wife and I wrote an article for Datamation, a major trade publication at the time, under the title, “Don’t Warehouse Dirty Data!” It’s been referenced quite a few times over the decades but is nowhere to be found using Google these days. The point is, if you have written a report using data, you have no doubt felt the pain of dirty data and it is nothing new.

Stairway to Advanced T-SQL

Stairway to Advanced T-SQL Level 9: Compare, Modify, Derive and Validate Date and Time Values

When you build applications that store data in SQL Server you will most likely have to store dates and times, and you’ll call functions to do date manipulations. It is important to understand the different date and time data types, and when to use one data type over another. In this level I will be exploring the different date and time data types and discussing when each type is appropriate.

Blogs

FIRST_VALUE vs. Min: #SQLNewBlogger

By

I had mentioned some new T-SQL functions for SQL Server 2022 and a commenter...

AI Step 1

By

As this is an Artificial Intelligence (AI) World, things are changing. We can see that...

Read the latest Blogs

Forums

funny character shows in one hdg name in ssis flat file connector

By stan

hi, i spent some time today in an existing pkg replumbing 5 flat file...

Automating DAX Studio...

By pietlinden

Still trying to figure out options for automating the export the result of a...

Cannot install development version.

By dunjoan

A while into install I get a Microsoft OLE DB Driver for SQL Server....

Visit the forum

Question of the Day

More Funny SELECTs

What does this code return?

SELECT
  ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2011'
      AND soh.OrderDate < '01/01/2012') AS OrdersIn2000
, ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2012'
      AND soh.OrderDate < '01/01/2013') AS OrdersIn2001
, ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2013'
      AND soh.OrderDate < '01/01/2014') AS OrdersIn2002;
GO

See possible answers