2014-09-29 (first published: 2010-02-04)
9,522 reads
2014-09-29 (first published: 2010-02-04)
9,522 reads
A fast and accurate way to calculate the distance in miles between two points, based on the latitudes and longitudes.
2014-09-26 (first published: 2009-01-31)
9,270 reads
2014-09-25 (first published: 2010-12-23)
26,224 reads
2014-09-23 (first published: 2010-02-17)
11,525 reads
This script will allow you get all the users and roles with permission on objects on all databases.
2014-09-18 (first published: 2009-03-05)
35,871 reads
Populate a calendar table with user set interval start and end datetime values.
2014-09-16 (first published: 2014-02-21)
2,130 reads
Populate a calendar table with user set interval start and end datetime values.
2014-09-15 (first published: 2014-02-21)
2,034 reads
2014-09-12 (first published: 2011-12-22)
3,360 reads
Transpose N rows of a table (v2.0 allows user to specify the table's schema)
2014-09-10 (first published: 2010-01-29)
2,082 reads
Create crosstab queries as easily as MS Access with a lot more power.
2014-09-09 (first published: 2009-04-02)
4,538 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