TSQL Challenge 44 – Identify products that belong to each unique color
The first part of your job is to identify the unique color combinations of products and the second part is to identify the products that have the given color combination.
The first part of your job is to identify the unique color combinations of products and the second part is to identify the products that have the given color combination.
Phil points out that the SQL Server community has a role to play in making sure that the wisdom of SQL Server Pundits is regularly tested and challenged.
The system stored procedure sp_start_job is a very useful T-SQL command that starts a SQL Agent job. The problem with this is that it starts the job and it doesn't wait until the job is finished and sometimes I want to start a job and wait until the job is finished and move on to another job or task that depends on the result of the previous job.
A day of free training near Washington DC in December. Come and learn how more about SQL Server.
The fifth installment of this fantastic series by MVP Andy Leonard looks at database versioning. Be sure to read this one to continue learning more about TDD.
This is a reprinted editorial from August 2, 2005. It is being republished as Steve is on vacation. Steve discusses the challenge of discussing salary in an interview.
I have audited for permissions on my databases because users seem to be accessing the tables, but I don't see permissions which give them such rights. I've gone through every Windows group that has access to my SQL Server and into the database, but with no success. How are the users accessing these tables?
This article covers multipath operations that require a different hierarchical logic than SQL naturally produced hierarchical processing. These include nonlinear data ordering, the renormalization of data to remove replicated data, and the processing of network structures.
This article covers how to implement the SQL Server 2008 Execution Log DB and package on SQL Server 2008 R2
If you've ever loaded a 2 GB CSV into pandas just to run a...
By James Serra
What problem is Fabric Ontology trying to solve? For years, most data conversations have...
By Steve Jones
Recently I ran across some code that used a lot of QUOTENAME() calls. A...
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...
Comments posted to this topic are about the item The string_agg function
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