Miscellaneous

SQLServerCentral Article

An Alternative XML Solution

  • Article

SQL Server 2000 added support for XML documents in a few ways. However the support was a little kludgy as it had not been designed into the product from the beginning, but added on later. New author Wayne Fillis brings us some C++ code and a new way to easily retrieve well formed XML documents from your SQL Server.

You rated this post out of 5. Change rating

2004-11-10

8,635 reads

Technical Article

Random Populate a Table

  • Script

Is quite a joke, but useful, I guess, and, of course, improvable. It need to use two random number generator (inclued) published some weeks ago here.Some fieldtype needs to be generating-improved (e.g. images) ... I wait suggestions and improvements

You rated this post out of 5. Change rating

2004-12-06 (first published: )

331 reads

Technical Article

Get Table Sizes and Percent of Database Size

  • Script

This script uses two undocumented stored procedures that retrieve all tables in the database in which it is run and lists the data and index sizes, the sum of these sizes, and the table's size percentage of the entire database. The results are presented in descending order of the sum of the data and index […]

5 (1)

You rated this post out of 5. Change rating

2004-11-24 (first published: )

2,388 reads

Technical Article

Working with Image Objects in InfoPath 2003 and SQL Server 2000

  • Article

You can use features in Microsoft Office InfoPath 2003 Service Pack (SP) 1 to work more efficiently with image objects and other data. Learn how to use BLOB data types to work with data stored in a Microsoft SQL Server 2000 database from an InfoPath form. InfoPath 2003 provides a robust and rich interface to store and access data in SQL Server databases. Learn about best practices for integrating SQL Server databases and InfoPath form data, with an illustrative example.

2004-10-22

1,146 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

Recursive Select - What is this really doing

By Leo.Miller

I've noticed several instances of what looks like a recursive insert with the format:...

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...

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