The SSMS Super Clipboard (Day 13)
We’re all used to using the clipboard in Windows programs. You copy something into it with Ctrl+C, and paste it...
2018-01-13
385 reads
We’re all used to using the clipboard in Windows programs. You copy something into it with Ctrl+C, and paste it...
2018-01-13
385 reads
In yesterday’s tip, I showed an example of changing a block of text from upper case to lower case. However,...
2018-01-12
273 reads
While Regular Expressions lets us work with text not cleanly formatted, if you are trying to work with text that...
2018-01-11
233 reads
Have you ever downloaded a script from an internet site, only to find that there are extra blank lines between...
2018-01-10
450 reads
Have you ever had to run a query on multiple servers? You could connect to each server one by one...
2018-01-09
424 reads
Have you ever had a script where you needed to run parts of it on different instances of SQL Server...
2018-01-08
432 reads
Do you have scripts that you need to run frequently, but every time you need to set some different parameters?...
2018-01-18 (first published: 2018-01-07)
1,538 reads
Have you ever had a long script that you are trying to scroll through? Do you wish that you could...
2018-01-06
532 reads
So you’re working with a query that you have loaded from a saved file. And now you want to open...
2018-01-05
362 reads
Have you ever been working in SSMS where you need to frequently access one particular script, but you are spending...
2018-01-04
411 reads
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...
SELECT * feels convenient, but in SQL Server it bloats I/O, burns network bandwidth,...
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
Comments posted to this topic are about the item The Maximum Value in the...
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