2016-12-06 (first published: 2015-07-27)
2,516 reads
2016-12-06 (first published: 2015-07-27)
2,516 reads
Will take a stored procedure and email the results in a dynamically generated embedded HTML table or as an attachment.
2016-12-05 (first published: 2015-05-29)
2,800 reads
Here's a script, for killing a SPIDs against a particular database, here am using BIN as the database.
2016-12-02 (first published: 2008-07-17)
1,805 reads
Truncating tables with constraints always had been a pain, since we have to drop and recreate all the FKs. I created a script that takes care of dropping and recreating the foreign keys while truncating. Please use with caution! and always respect your Data !
2016-12-01 (first published: 2016-11-28)
1,369 reads
2016-11-28 (first published: 2016-11-21)
4,122 reads
Warm the cache with a particular table by reading it into memory.
2016-11-25 (first published: 2016-11-14)
892 reads
2016-11-24 (first published: 2003-07-09)
789 reads
2016-11-22 (first published: 2016-11-11)
830 reads
This query generate add/alter script for missing or different columns. Execute on source database and copy resultset. Execute generated script on any database (may be all customer databases) Missing columns will be created and different types will change as source schema.
2016-11-18 (first published: 2016-11-07)
910 reads
Oracle Built in Function INSTR is a great function if you wish to locate a string or a subset of string in the nth place.
2016-11-17 (first published: 2016-11-04)
1,413 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