Find the position of all occurrences of an expression within a string
This iTVF returns both the relative and the actual positions of ALL occurrences of a string within a string.
2015-05-12 (first published: 2013-03-24)
2,244 reads
This iTVF returns both the relative and the actual positions of ALL occurrences of a string within a string.
2015-05-12 (first published: 2013-03-24)
2,244 reads
Review the error log for possible brute force or dictionary attacks on your SQL Server instance.
2015-05-08 (first published: 2013-05-22)
2,697 reads
Dynamically check your SQL Error Logs and filter using Powershell.
2015-05-07 (first published: 2013-06-04)
4,659 reads
If you get alerts for high CPU, but by the time you login/check the server cpu is back to normal, then use this sp to create a sql agent job and run it every min.
2015-05-06 (first published: 2013-06-04)
3,026 reads
2015-05-06
409 reads
Easily and quickly delete all database accounts even if they don't have the same name as server login.
2015-05-05 (first published: 2013-07-18)
6,983 reads
Dynamically build a comma delimited CSV file using the BCP utility from any table or view in your database with a useful code debugging parameter.
2015-05-04 (first published: 2013-08-12)
5,732 reads
2015-05-01 (first published: 2013-08-13)
3,785 reads
This function converts an integer to its binary representation. e.g. 15 is converted to '00001111'
2015-04-29 (first published: 2014-02-24)
804 reads
2015-04-24 (first published: 2015-04-15)
1,204 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...
I’m currently researching the best wireless credit card terminal for a growing business and...
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...
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