This article has a T-SQL function to detect the SQL Agent job state.
In general XML documents or fragments are held in strings as text markup. In SQL Server, XML variables and columns are instead tokenised to allow rapid access to the data within. This is fine, but can cause some odd problems, such as ' entitization'. What do you do if you need to preserve the formatting? As usual Rob Sheldon comes to our aid.
The TSQL aggregate function SUM() gives a number based on the addition of the values of multiple rows to each other. Do the same thing but with multiplication instead of addition.
The biggest security threat always seems to come from insiders and today Steve Jones talks about the need to monitor your environment.
It seems inevitable that many customers will end up paying more to get the same features they have today, under the new SQL Server licencing model, unless they respond to Microsoft's creativity with some of their own.
The challenge is to find the Episode and Sequence based on interval.
One of the more popular counters used by DBAs to monitor SQL Server performance, the Buffer Cache Hit Ratio, is useless as a predictor of imminent performance problems. Worse, it can be misleading. Jonathan Kehayias demonstrates this convincingly with some simple tests.
This article takes a closer look at SQL Server getdate() and sysdatetime() functions.
By SQLPals
Track SQL Server Configuration Changes Using the Error Log If you...
Good documentation gets you started. Good books get you deep. After years of working...
By Vinay Thakur
In previous posts, we looked at the SQL Server engine. for us DBAs, the...
WhatsApp:0817866887 Jl. Borobudur No.I, RT.03/RW.07, Mojolangu, Kec. Lowokwaru, Kota Malang, Jawa Timur 65125
We have a SQL Server installed. We have a 500GB drive for the database....
Comments posted to this topic are about the item Creating a JSON Document IV
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished ------ -------- ---- --------------- 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960 5 49ers San Francisco 1946 6 Broncos Denver 1960 7 Seahawks Seattle 1976 8 Patriots New England 1960If I run this code, how many rows are returned?
SELECT YearEstablished, json_objectagg(city : TeamName) FROM dbo.NFLTeams GROUP BY YearEstablished;See possible answers