Miscellaneous

Technical Article

Function to determine business hours

  • Script

This function takes two dates and returns the number of business hours between the two dates. The function does not support holidays at this time, but the script could be modified to query a holiday table to exclude those holidays.

5 (2)

You rated this post out of 5. Change rating

2005-04-15 (first published: )

926 reads

Technical Article

Add Enterprise Manager registrations quickly

  • Script

Use this Perl script to add Enterprise Manager registrations from a text file. The text file should contain three fields seperated by spaces. The first two fields are the server groups you want to create, and the last is the server name. ex...Production Accounting ACTPRSQL01QA Accounting ACTQASQL01The script also goes out and registers all SQL […]

You rated this post out of 5. Change rating

2007-06-19 (first published: )

292 reads

External Article

MDX Essentials: Set and String Functions: The GENERATE() Function

  • Article

In this lesson, we will introduce a function that provides us the ability to derive a set by systematically applying a set expression to each of the members of a set we define. GENERATE() is a potent function in our MDX toolset, in that it enables us to select precisely only certain members of a dimension level. It effectively operates upon two sets to create a new set, based upon the members of a second set that are also in a primary set.

2005-03-17

1,749 reads

External Article

The value of experienced coders

  • Article

I was about 40 the first time I was told I should not continue coding. A well-meaning vice president at my company pulled me aside at a party and told me that I was getting too old to code. He had been a coder himself, knew that he was getting too old, and moved over to sales. He was sure that I should be moving over to another part of the business. I told him that perhaps not only did he have a problem coding when he reached 40, he probably had the same problem at 38. I said that I was perfectly happy as a coder, and had every intention of continuing as long as someone was willing to pay me.

2005-03-15

3,434 reads

SQLServerCentral Article

SQL Server DevCon 2005

  • Article

New author Mike McCallum spent a week in London at the 2005 SQL Server DevCon conference. It's a smaller event than the PASS Summits, but if it fits your travel or schedule plans better, take a read and see what he thought. With training budgets tight and SQL Server 2005 bringing a completely new paradigm, knowing all your training options is a good thing.

You rated this post out of 5. Change rating

2005-03-14

3,505 reads

Technical Article

Verify Directory Exists and Create if Necessary

  • Script

This script will check to see if a directory exists and if it does not then it will create the directory. I did not create this as a stored procedure but it certainly could be. I tend to just place this as one of my job steps so I can create a backup file of […]

You rated this post out of 5. Change rating

2005-03-24 (first published: )

645 reads

External Article

COM Without Registration

  • Article

When .NET first appeared it wasn't unusual to hear the question "Is COM dead?" In fact COM seems to be alive and well, and in this article I'll look at the way that Windows XP and Windows Server 2003 allow you to use COM in a side-by-side way without installing the usual registration entries – you won't need to use the Windows Registry to use side-by-side COM components.

2005-03-08

1,348 reads

Technical Article

The Insight Reports: Grid Computing

  • Article

In the two years since Insight's last examination of the topic, grid computing has moved out of the laboratory and into mainstream commercial applications. No longer the exclusive tool of researchers seeking to harness enough compute power for massive computational challenges such as weather modeling or weapons test simulations, today grids are being deployed in more traditional commercial computing applications. For example, commercial computing stalwarts IBM, Intel, Hewlett-Packard (HP) and Sun recently announced they were forming the Globus Consortium to drive the technology into the mainstream for applications such as financial analysis, oil exploration and pharmaceutical testing. And within the technical community, new standards being developed called the Web Services Resource Framework (WSRF) will foster convergence of the Web service and grid computing communities, which in the years ahead is likely to have a major impact on quality and diversity of Web services.

2005-03-04

1,107 reads

Blogs

The CDO’s Playbook for AI Driven Decision Making

By

The New Arena of Leadership The role of the Chief Data Officer is no...

sp_snapshot – The easy way to take database snapshots of one or more databases – V3.0

By

Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...

SELECT *

By

SELECT * feels convenient, but in SQL Server it bloats I/O, burns network bandwidth,...

Read the latest Blogs

Forums

Cleaning Up the Cloud

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Cleaning Up the Cloud

The Maximum Value in the Identity Column

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Maximum Value in the...

Oracle Performance Tuning: Practical Techniques Every DBA Should Master

By Udaya Veeramreddygari

Comments posted to this topic are about the item Oracle Performance Tuning: Practical Techniques...

Visit the forum

Question of the Day

The Maximum Value in the Identity Column

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-06
I 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 OFF
I now run this code.
DBCC CHECKIDENT(TravelLog)
GO
INSERT dbo.TravelLog
(
    CityID,
    StartDate,
    EndDate
)
VALUES
(4, '2025-10-14', '2025-10-17')
GO
What is the value for TravelLogID for the row I inserted for CityID 4 and dates starting on 14 Oct 2025?  

See possible answers