Rolling back transactions with cursors and local variables.
I’ve been doing some work on a credit card payment system lately. Obviously this needs to be robust and consistent...
2014-04-10
795 reads
I’ve been doing some work on a credit card payment system lately. Obviously this needs to be robust and consistent...
2014-04-10
795 reads
If you’re like me, you might be thinking “I want some more things to think about when I migrate between...
2014-03-27
644 reads
We all have blind spots in our knowledge. We don’t know they are there and when we are thinking through...
2014-03-13
737 reads
I’d be struggling to remember a week where I hadn’t run a query against the dmv sys.dm_db_index_usage_stats to find unused...
2014-03-10 (first published: 2014-02-27)
3,218 reads
Problem: You require the ability to perform a repeatable standardised installation of multiple instances of SQL Server or the ability...
2014-02-13
44,579 reads
The Problem: A legacy table contains amounts and a char column indicating whether the amount is a credit or a...
2014-02-11 (first published: 2014-02-04)
3,079 reads
It’s a well known fact that any sitcom that runs for a certain length of time will release a clip...
2014-01-13
1,675 reads
A while ago I blogged my about my approach to service packing a SQL Server 2008R2 active active cluster. Time...
2014-01-08
1,580 reads
I struck this error in one of my SSIS packages, I found lots of tips and suggestions online for the...
2014-01-08 (first published: 2014-01-06)
1,996 reads
The Setup:
Standard best practise is to have auto create and auto update statistics set for SQL Server databases. But there...
2013-09-03 (first published: 2013-08-28)
3,503 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...
Comments posted to this topic are about the item Lessons from the Postmark-MCP Backdoor
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:...
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