John

John Morehouse is currently a Consultant with Denny Cherry & Associates living in Louisville, Kentucky. With over 2 decades of technical experience in various industries, John now focuses on the Microsoft Data platform and specializes in Microsoft SQL Server. He is honored to be a Microsoft Data Platform MVP, 2016 Idera Ace, Friend of Red Gate since 2015, Sentry One PAC member & Community Ambassador. John has passion around speaking, teaching technical topics and giving back to the technical community. He is a user group leader, SQL Saturday organizer, and former PASS regional mentor. He is also a blogger, avid tweeter, and a frequent speaker at SQL Saturday's as well as other conferences. If you want to find John, you can find him on Twitter (@sqlrus) or on his blog, http://sqlrus.com.

Blog Post

I’m Speaking!

After a long hiatus of not blogging, I’m trying to get back into writing.  So, to kick it off first thing in 2024, I’m speaking! I’m honored to have been...

2024-01-19

6 reads

Blog Post

Secure Travel

Last Updated on March 4, 2022 by John Morehouse Update: This post was originally published on March 8th, 2019 and a lot of things have changed over the last...

2022-03-04

41 reads

Blogs

Spark Connect Dotnet Variant Data Type

By

All Spark Connect Posts I recently published the latest version of the Spark Connect Dotnet...

A New Word: Opia

By

opia – n. the ambiguous intensity of eye contact The entry for this says...

Friday Flyway Tips: Searching a Migration

By

This was actually a cool tip I saw internally from one of the product...

Read the latest Blogs

Forums

Table Partitioning SQL server 2022

By Saran

Hi All, I am currently testing the Table Partitioning to implement in SQL server...

STRING_AGG's behavior

By Alessandro Mortola

Comments posted to this topic are about the item STRING_AGG's behavior

The Role of Databases in the Era of AI

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Role of Databases in...

Visit the forum

Question of the Day

STRING_AGG's behavior

Executing the following script (Sql Server 2022), you get the table t0 with 10 rows:
CREATE TABLE t0
( id     INT PRIMARY KEY
, field1 VARCHAR(1000)
, field2 VARCHAR(MAX));
INSERT INTO t0
SELECT
  gs.value
, REPLICATE ('X', 1000)
, REPLICATE ('Y', 1000)
FROM generate_series(1, 10, 1) gs;
GO
What happens if you execute the following statements?
  1. select STRING_AGG(field1, ';') within group (order by id)  from t0;
  2. select STRING_AGG(field2, ';') within group (order by id)  from t0;

See possible answers