2012-05-22 (first published: 2012-05-01)
851 reads
2012-05-22 (first published: 2012-05-01)
851 reads
Find a string in any "string" (char, varchar, nchar etc) column in the database.
2012-05-18 (first published: 2007-12-19)
5,844 reads
Calculates the nth due date for any given date, while accounting for weekends.
2012-05-16 (first published: 2007-10-11)
3,846 reads
This script maps the primary key - foreign key relations regardless if the column names are the same or not.
2012-05-15 (first published: 2007-11-07)
3,007 reads
A script to generate a recovery script for setting your sa account back to the password it is using at the time of running this script.
2012-05-14 (first published: 2012-04-09)
1,019 reads
Searches database for up to 4 keywords. It will search through SPs, UDFs, Triggers, SSIS packages, jobs, table names, and column names.
2012-05-10 (first published: 2012-04-18)
2,242 reads
2012-05-09 (first published: 2012-04-19)
1,388 reads
An interesting recursive CTE to list out the non-alphanumeric characters in a column of a table.
2012-05-08 (first published: 2012-04-12)
3,034 reads
2012-04-30 (first published: 2012-04-04)
695 reads
This topic explains the log shipping if the primary database is suspected or corrupted and how you can convert the secondary database into primary database.
2012-04-27 (first published: 2012-03-31)
1,035 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