2016-05-17 (first published: 2014-08-25)
2,602 reads
2016-05-17 (first published: 2014-08-25)
2,602 reads
2016-05-16 (first published: 2012-10-17)
5,588 reads
Compare the structure/layout of two tables within an instance of SQL Server (version 2012) and return non-matches.
2016-05-13 (first published: 2014-04-23)
2,965 reads
Concatenate columns grouping on Index column (approach for summing varchar columns by grouping on index)
2016-05-12 (first published: 2009-09-13)
1,613 reads
Query that simulates running sp_spaceused on every applicable object in a database and gathering it all into a single result set.
2016-05-10 (first published: 2013-06-03)
2,317 reads
Yet another schedule description query with added grammatical improvements.
2016-05-06 (first published: 2016-04-20)
879 reads
I was recently asked to monitor the Database size on the SQL server, and display the results in a report.
2016-05-05 (first published: 2016-04-16)
831 reads
An enhanced version of a script originally posted by Robert Pearl some time ago. It now takes into account changes in the tabelresults for CHECKDB in latter versions of SQL Server.
2016-05-04 (first published: 2016-04-20)
1,322 reads
searches entire db for a string, number, or date, returns list of results
2016-05-02 (first published: 2016-04-20)
1,289 reads
As part of the application to monitor SQL health I created.
The procedure returns status of the SQL server Agent
2016-04-29 (first published: 2016-04-16)
652 reads
By Steve Jones
I was experimenting with CHOOSE() recently after I was asked a question. In a...
By DesertDBA
I did not expect 27 responses to my T-SQL Tuesday #204 invitation, but it...
Should you adopt an off-the-shelf AI tool, partner with a specialist, build in-house, or...
Has anyone ever seen this before? I have sysadmin permission on a server. I...
Comments posted to this topic are about the item Switching Schema II
Comments posted to this topic are about the item A Practical Approach to Automating...
I run this query:
SELECT s.name AS schemaname , o.name AS objectname FROM sys.objects o INNER JOIN sys.schemas s ON s.schema_id = o.schema_id WHERE o.name = 'Beer'I get two rows back for the objects, named dbo.beer and etl.beer. Both the tables have identical schemas and are not partitioned. There are 25 rows in dbo.beer and 0 rows in etl.beer. I run this code:
ALTER TABLE dbo.beer switch TO etl.beerWhat happens? See possible answers