2016-11-24 (first published: 2003-07-09)
760 reads
2016-11-24 (first published: 2003-07-09)
760 reads
Use this script to make HTTP posts or requests from withing SQL. It uses the XML HTTP COM object.
2003-07-08
1,055 reads
I was asked by a customer to create a scheduled weekly report detailing work that had been completed in the previous week (Monday to Friday) I figured they might lose the report or something might happen to stop the scheduler from running it, and I didn't want to have to modify my script to work […]
2003-07-07
146 reads
The book is almost here! We've been working on it for months, now you can find out what it's going to look like, who the authors are, and how much it costs. It's been a lot of work but we think it's been worth it. Read the article to see how to save $3 off an already low price.
2003-07-07
6,069 reads
UDF - SQL 2000 and higherThis function returns an 18 row table of date ranges around a given date.The ranges are: Day, Week (Sunday to Saturday), Month, Quarter, Half Year, Year.For each range there are 3 values: Previous, Same and NextExample of usage:Joined to an orders table:Select r.period, count(o.order_id)from orders oinner join dbo.ufn_date_ranges('2003-04-01') ron o.order_date […]
2007-04-12 (first published: 2003-07-03)
492 reads
This article from Robbe Morris at EggheadCafe.com looks at how to generate a script for a stored procedure that includes all it's dependencies.
2003-07-03
1,549 reads
SUBSTR returns a portion of char, beginning at character @StartPos, @Length characters long. If @StartPos is 0, it is treated as 1. If @StartPos is positive, Oracle counts from the beginning of char to find the first character. If @StartPos is negative, Oracle counts backwards from the end of char.
2003-07-02
264 reads
2003-07-02
398 reads
2003-07-02
636 reads
INITCAP returns char, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by white space or characters that are not alphanumeric.
2006-05-29 (first published: 2003-07-02)
647 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