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,014 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,014 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
352 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
518 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,120 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
482 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
338 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
468 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
471 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,103 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
430 reads
Ready to dive into the world of SQL? Whether you're dreaming of a lucrative...
This comic was retweeted into my timeline on Twitter (I refuse to call it...
By Steve Jones
Recently I’ve been looking at archiving some data at SQL Saturday, possibly querying it,...
Comments posted to this topic are about the item Creating a CSV Parser in...
Hello experts, We set up the Brent Ozar SQL Agent alerts, one of which...
Hi as you can see at https://www.sqlservercentral.com/forums/topic/test-sql-servers#post-4422832 we would really like multiple instances in...
I want to enable two trace flags, 4199 and 4137, for a single query. How should I do this:
-- A SELECT a.AddressID , a.AddressLine1 , a.AddressLine2 , a.City , a.StateProvinceID , a.PostalCode , p.FirstName , p.LastName FROM Person.Address a INNER JOIN person.Person AS p ON p.rowguid = a.rowguid WHERE City = 'SEATTLE' AND PostalCode = 98104 OPTION (QUERYTRACEON 4199, 4137); -- B SELECT a.AddressID , a.AddressLine1 , a.AddressLine2 , a.City , a.StateProvinceID , a.PostalCode , p.FirstName , p.LastName FROM Person.Address a INNER JOIN person.Person AS p ON p.rowguid = a.rowguid WHERE City = 'SEATTLE' AND PostalCode = 98104 OPTION (QUERYTRACEON 4199, QUERYTRACEON 4137); -- C SELECT a.AddressID , a.AddressLine1 , a.AddressLine2 , a.City , a.StateProvinceID , a.PostalCode , p.FirstName , p.LastName FROM Person.Address a INNER JOIN person.Person AS p ON p.rowguid = a.rowguid WHERE City = 'SEATTLE' AND PostalCode = 98104 OPTION (QUERYTRACEON 4199), (QUERYTRACEON 4137);See possible answers