2016-09-20 (first published: 2016-08-17)
1,025 reads
2016-09-20 (first published: 2016-08-17)
1,025 reads
Sample script to read deadlock graph XML from default system health XEvent.
2016-09-16 (first published: 2014-10-16)
4,672 reads
Find minimum and maximum values for all date columns in a table or range of tables, using a mask.
2016-09-15 (first published: 2014-10-27)
3,055 reads
http://www.sqlservercentral.com/scripts/split+string/117123/
The above script will split upto 256 char length only. This new version will split upto N length.
2016-09-14 (first published: 2014-10-30)
1,850 reads
This function is used to get the distance between 2 coordinates/latlong in the different formats
2016-09-13 (first published: 2014-10-31)
1,703 reads
This functions are used to convert integers/numbers into binary format and viceversa.
2016-09-09 (first published: 2014-11-18)
1,896 reads
This procedure takes in charge the clean-up for a given table based on a date field
given as parameter and a retention expressed as a number of days.
2016-09-08 (first published: 2014-11-19)
1,525 reads
2016-09-06 (first published: 2014-11-20)
1,849 reads
2016-09-05 (first published: 2015-05-20)
2,674 reads
The bar for entry into CodeSOD is pretty straight forward: professionally-developed code that elicits that certain What The— reaction. Though there have been a few exceptions over the years, generally speaking, student code, hobbyist code, and amateur code need not apply. That said, I'd like to try something a little different today. Today's example is not technically professionally-developed, it's a Stupid Coding Trick.
"So I was bored at work one day," Graeme Job explains, "and wondered, what's the most useless thing I could do with my time without actually doing anything. Then it hit me. I could use T-SQL to generate... Mandelbrot."
Graeme continued, "Following is a single T-SQL SELECT statement that generates a text-representation of a Mandelbrot Set. The results are best viewed in text-mode."
2016-09-02 (first published: 2014-12-12)
5,480 reads
By Steve Jones
This month we have a new host, Meagan Longoria, who graciously agreed to help...
By Steve Jones
I’m at the UK Redgate office today, meeting with senior leaders in all areas...
Optimizing Azure SQL Database performance often begins with identifying the most resource-intensive queries. Understanding...
Comments posted to this topic are about the item Creating a JSON Document IV
By VishnuGupthanSQLPowershellDBA
Comments posted to this topic are about the item Restoring Azure Key Vault Keys...
When the schema of an object is changed, SQL Server wipes out the previous...
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