Check Twice, Update Once
An update to the Microsoft Best Practices Analyzer tool intrigues Steve Jones as it seems to have been enhanced to better help DBAs manage SQL Server.
An update to the Microsoft Best Practices Analyzer tool intrigues Steve Jones as it seems to have been enhanced to better help DBAs manage SQL Server.
Members of the securityadmin role can escalate to sysadmin rights. Here's how to restrict them back to 2000 levels.
Before you can tackle any performance issues with a working database, you need to know which queries to work on first: The ones that are taking the most time in total, and which are the most expensive in terms of cache, CPU and disk. Although SQL Server Management Studio can help, it isn't long before you need an armoury of DMVs to provide you the statistics to find the culprits.
Unlike fine wine, database statistics do not improve with age. I recently helped out with a client who was having...
This article describes a way to parse a result set in SSIS using For each loop container, variables and SQL task.
Today Steve Jones has a little fun with titles in technology, and what we might start to call ourselves instead of DBAs.
Cursors provide a means of processing through a set of records row-by-row. However, many companies have a policy against using cursors in their SQL Server standards. This article examines the problem with cursors and alternatives to using them.
Utilize simple boolean algebra and nullable parameters to implement conditional WHERE clauses without dynamic SQL.
Using the Trace Management objects API it is possible to capture the events happening on SQL Server or indeed Analysis Services. I got to thinking that this would be a good thing to stream out in real time in StreamInsight and do some analysis “In Flight”. So here is a short video of me doing just that.
Steve Jones talks about the SQL Community and why it's so great. Hint: it's the people.
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