Marty

  • Interests: Playing Guitar, Music Theory

Blog Post

SQL Server STUFF

The STUFF function in SQL Server is one of those little gems that is very under-used but when needed can be a real handy utility – at least that’s...

2022-01-10

11 reads

Blog Post

OPENJSON and CROSS APPLY

OPENJSON is pretty central to manipulating JSON documents in T-SQL. As we’ve seen, we can use a default schema that will return metadata about the JSON document or we...

2020-06-24 (first published: )

6,476 reads

Blog Post

OPENJSON and an Alias

Using Aliases in T-SQL is very common. We can alias both Tables (FROM clause) and Columns (SELECT clause) and some other things too. It’s all pretty fundamental to writing...

2020-06-08

264 reads

Blog Post

OPENJSON and an Alias

Using Aliases in T-SQL is very common. We can alias both Tables (FROM clause) and Columns (SELECT clause) and some other things too. It’s all pretty fundamental to writing...

2020-06-08

2 reads

Blogs

A New Word: Fardle-dun

By

fardle-din – n. a long-overdue argument that shakes up a relationship, burning wildly through...

Lukáš Karlovský: I got the green light from management and built Fabric specialization from scratch

By

The post Lukáš Karlovský: I got the green light from management and built Fabric...

FIRST_VALUE vs. Min: #SQLNewBlogger

By

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

Read the latest Blogs

Forums

Migrating from SSRS 2008 (SP Integrated) to 2022 (Native)

By zootbot

Has anyone done a migration from sharepoint integrated ssrs to native? I'm not finding...

NC index creation duration question

By Coffee_&_SQL

Hey All, My setup is as follows: Table with Clustered Index on ID col....

CPU Performance Advice in SQL Server 2005

By JoeLee

I am having problems with CPU performance on SQL Server 2005. CPU spikes frequently...

Visit the forum

Question of the Day

Subqueries II

What is wrong (if anything) with this code?

SELECT *
 FROM Sales.SalesOrderHeader AS soh 
 WHERE customerid IN (SELECT soh.CustomerID 
                       FROM Sales.Customer AS C
   WHERE soh.CurrencyRateID = 1
   ORDER BY c.ModifiedDate)

See possible answers