Create a computed column in SQL Server using XML data
Create a computed column in SQL Server using XML data and optimize SQL queries. Learn how to create a function for XQuery and use it within the computed column formula.
Create a computed column in SQL Server using XML data and optimize SQL queries. Learn how to create a function for XQuery and use it within the computed column formula.
Learn how to build a B-tree similar to those used by databases to implement indexes.
Over the years, there have been several attempts to turn conventional RDBMSs into object relational databases, by inserting an intermediate layer. The driving force behind this was the generally-held assumption that the relational model could not handle complex data types.
The CLR has not been well-received and most people use it for Regular Expressions and string functions. Here is an example that goes beyond trivial uses.
Parameterization of MDX functions is one of those things that cannot be delivered solely via graphical MDX Editor – but then, you really didn’t think that you could avoid actually touching MDX at all, did you? BI Architect Bill Pearson demonstrates a way to parameterize the highly useful LastPeriods() function.
Have you seen disasters in your environment? I would bet you have at some point. Let's see if our top 13 disasters matches your experiences.
I see, with some relief that the threatened removal of Rules and Defaults in SQL Server 2008 hasn’t happened. There has been a stay of execution. Even though they are documented, they still come with a dire warning that they are deprecated and will be removed in future versions. They have fallen foul of the SQL Standards committee, and we are now supposed to use check constraints instead.
By Steve Jones
Thanks to everyone who attended my sessions today at SQL Saturday Boston 2025. I’ve...
SQL Server 2025 introduces native support for vector data types and external AI models....
By Steve Jones
Fear is fueled by a lack of imagination. The antidote to fear is not...
I'm building ETL packages in SSIS. My data comes from an OLE DB Source...
Comments posted to this topic are about the item Building AI Governance and Policies-...
Why is sql doing a full scan VS seeking on the index? I've included...
The DBCC CHECKIDENT command is used when working with identity values. I have a table with 10 rows in it that looks like this:
TravelLogID CityID StartDate EndDate 1 1 2025-01-11 2025-01-16 2 2 2025-01-11 2025-01-16 3 3 2025-01-11 2025-01-16 4 4 2025-01-11 2025-01-16 5 5 2025-01-11 2025-01-16 6 6 2025-01-11 2025-01-16 7 7 2025-01-11 2025-01-16 8 8 2025-01-11 2025-01-16 9 9 2025-01-11 2025-01-16 10 10 2025-01-11 2025-01-16The docs for DBCC CHECKIDENT say this if I run with only the table parameter: "If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column. " I run this code:
DELETE dbo.TravelLog WHERE TravelLogID >= 9 GO DBCC CHECKIDENT(TravelLog, RESEED) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-09-14', '2025-09-17') GOWhat is the identity value for the new row inserted by the insert statement above? See possible answers