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,020 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,020 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
357 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
521 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
491 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
340 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
470 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
490 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,106 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
441 reads
By Steve Jones
ecstatic shock – n. a surge of energy upon catching a glimpse from someone...
By Chris Yates
The New Arena of Leadership The role of the Chief Data Officer is no...
Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...
Just saw the "Azure Extension for SQL Server" Does anyone has experience with it?...
I've noticed several instances of what looks like a recursive insert with the format:...
Comments posted to this topic are about the item Cleaning Up the Cloud
I have a table with this data:
TravelLogID CityID StartDate EndDate 1 1 2025-01-01 2025-01-06 2 2 2025-01-01 2025-01-06 3 3 2025-01-01 2025-01-06 4 4 2025-01-01 2025-01-06 5 5 2025-01-01 2025-01-06I run this code:
SELECT IDENT_CURRENT('TravelLog')I get the value 5 back. Now I do this:
SET IDENTITY_INSERT dbo.TravelLog ON INSERT dbo.TravelLog ( TravelLogID, CityID, StartDate, EndDate ) VALUES (25, 5, '2025-09-12', '2025-09-17') SET IDENTITY_INSERT dbo.TravelLog OFFI now run this code.
DBCC CHECKIDENT(TravelLog) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-10-14', '2025-10-17') GOWhat is the value for TravelLogID for the row I inserted for CityID 4 and dates starting on 14 Oct 2025? See possible answers