Difference between dates: Time Format
This function returns the difference between dates in the H:MM:SS format.
2004-03-05
260 reads
This function returns the difference between dates in the H:MM:SS format.
2004-03-05
260 reads
Dinesh ran into a situation where a client had very specific requirements for generating keys. Take a look at the solution, can you better alternatives? Sometimes you just can't talk the client into changing!
2004-03-05
15,233 reads
2004-03-04
145 reads
This is an update to sp_helpindex, it allows you to pass the table name and whether you want to retrieve clustered, nonclustered or primary key indexes for a table. Using the sp_msforeach table will allow you to do this for all tables in a database. Inserting the data into a table will allow you to […]
2004-03-04
1,009 reads
This sp will return the column names for a table(s) and form a "Select Statement" for a table(s). We can pass a table name as a parameter to display a "Select Statement" for that table.
2004-03-04
113 reads
New Author! And long time reader - Jeffrey was site member #712, almost 3 years and 130,000 members ago! This article describes the skills needed to progress from junior to intermediate to senior DBA.
2007-10-02 (first published: 2004-03-03)
38,980 reads
This Script takes any table wich contains rows with names and valus and converts it into a result set with the names as collumn names and the values as values.Just set @TableName,@vcName,@vcValue to the desired values.
2004-03-02
188 reads
This is an update to sp_helpindex, it allows you to pass the table name and whether you want to retrieve clustered, nonclustered or primary key indexes for a table. Using the sp_msforeach table will allow you to do this for all tables in a database. Inserting the data into a table will allow you to […]
2004-03-01
1,283 reads
This function allows you to capture the next valid error number to use in the sp_addmessage sp. No matter hoy much user errors you have define, you will always get the next available error number.
2004-02-27
117 reads
This function will return a table with all matches from a RegExp find.Also the first 9 SubMatches are returned.A example execution is included.
2004-02-26
234 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