Fix WHERE clause AND/OR/NOT confusion with truth tables
The ANDs, ORs, and NOTs in a T-SQL query's WHERE clause can get confusing, especially if you're thinking of it...
2018-04-17
2,054 reads
The ANDs, ORs, and NOTs in a T-SQL query's WHERE clause can get confusing, especially if you're thinking of it...
2018-04-17
2,054 reads
Keep a good eye on your backup and maintenance; they’re kind of important to the health and well-being of your job wait I mean...
2018-04-06
383 reads
Code that writes code it one of the best productivity tips I can give you. And no, I’m not talking...
2018-03-30
560 reads
A client recently upgraded a server, and then started receiving this error when they tried to access the SSRS Reports...
2018-03-19
1,128 reads
Update: Now with Object Explorer shortcuts! One of the most common things I do within SSMS is to change connection for...
2018-03-14
521 reads
Edit: Now with discount code! We’ll be speaking at SQL Saturday Colorado Springs on Saturday March 24. The day before that, we...
2018-03-13
349 reads
Here’s a good starter article on SQL Server logins, users, and SIDs: SQL Server Logins, Users and Security Identifiers (SIDs) Some...
2018-03-07
483 reads
You need something from the database admin. Maybe it’s permissions, maybe it’s code troubleshooting, or maybe it’s just that the database is...
2018-02-27
518 reads
My son, who wishes to be known as “Pigeon” for the duration of this blog, was mixing the names of Hogwarts...
2018-02-17
1,121 reads
While we’re on the topic of SQL Server Reporting Services: WHYYYYYY is the Reporting Service Configuration Manager so hard to...
2018-02-07
453 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