How to Expand a Range of Dates into Rows using a SQL Server Numbers Table
In this article we look at different T-SQL code examples that can help you build a range of date rows based on a starting and ending date.
2020-07-28
In this article we look at different T-SQL code examples that can help you build a range of date rows based on a starting and ending date.
2020-07-28
This webinar will cover how to use SQL Server plan guides and the query store to fix problematic queries and ways to improve query performance.
2020-07-14
Learn how to configure SQL Server and Windows to allow others to connect to an instance remotely.
2020-01-06
137,381 reads
In this tip we look at how to change specific parts of a date such as the Year, Month or Day for data stored in a SQL Server table.
2019-12-17
Steve highlights a few items from a busy Microsoft and SQL Server news week.
2019-11-09
234 reads
Learn how you can create a SQL Server instance in the Google Cloud Platform.
2019-09-26
3,923 reads
2019-09-14
299 reads
The technologies that we see in other data platform products sometimes flow to SQL Server.
2019-06-20
257 reads
When you build a VM for SQL Server in Amazon EC2, Azure VMs, or Google Compute Engine, it’s all too easy to overlook the CPU speeds that you’re getting. Brent Ozar explains when to stop and check the VM type you used when building this VM.
2019-05-24
1,077 reads
SQL Server contains many built-in views and functions that can be used to understand what is going on “under the hood,” and security is no exception. In this article, Robert Sheldon explains the security related catalogue views, dynamic management views, and system functions.
2019-05-20
I’ve been thinking a lot lately about what it actually takes to make an...
By Steve Jones
Redgate is a for-profit company. We look to make money by building and selling...
I’ve uploaded the slides for my Techorama session Microsoft Fabric for Dummies and my...
Comments posted to this topic are about the item Even When You Know What...
Comments posted to this topic are about the item The New Software Team
Comments posted to this topic are about the item Database Mail in SQL Server...
We create the following table and then insert some records in it:
create table t1 ( id int primary key, category char(1) not null, product varchar(50) ); insert into t1 values (1, 'A', 'Product 1'), (2, 'A', 'Product 2'), (3, 'A', 'Product 3'), (4, 'B', 'Product 4'), (5, 'B', 'Product 5');What happens if we execute the following query in both Sql Server and PostgreSQL?
select id,
category,
string_agg(product, ';')
over (partition by category order by id
rows between unbounded preceding and unbounded following) as stragg
from t1; See possible answers