SQL Server 2005 2008 Integration Services (SSIS) information, products, free scripts, tasks, components, productivity
Got a SQL Server or .NET question? Discuss it in the forums. (SQL Server Forums | Dot NET Forums)
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.

February 2009 - Posts

SQL Server - IDENTITY related functions, commands, system variables, catalog views

In the previous posts we have examined IDENTITY columns in detail. We discussed several IDENTITY related functions, commands, system variables and terms. This post intends to summarize them. IDENTITY Property IDENTITY is an attribute that you can assign...
by Jacob Sebastian on 02-12-2009 | 220 Views

Moving to community server at www.beyondrelational.com

I was not very fortunate with my blogging platforms since the last few years. I started with blogger in 2006 and then thought it is a better idea to host blogs on my own web site. I used to blog about some SQL Server stuff and some .NET stuff those days...
by Jacob Sebastian on 02-07-2009 | 497 Views

SQL Server - How to retrieve the identity values generated by a multi-row insert?

After inserting a row to a table with an IDENTITY column, you can query the global variable @@identity or call SCOPE_IDENTITY() function to retrieve the newly inserted IDENTITY value. In a previous post we saw that @@identity returns the last IDENTITY...
by Jacob Sebastian on 02-06-2009 | 168 Views

XQuery Lab 42 - How to Execute a Dynamic OPENXML() Query?

I heard this question from many people. Executing a dynamic OPENXML() query is little tricky. Before we look at a dynamic OPENXML() query, let us look at the static version. Here is an example document that we will parse using OPENXML() in this session...
by Jacob Sebastian on 02-05-2009 | 957 Views

XQuery Lab 41 - Another string parsing example using XQuery

We have seen a number of string parsing/manipulating examples using XQuery and FOR XML in the previous sessions of XQuery Labs . This session presents yet another string parsing example using XML data type methods. Here is the string value that we need...
by Jacob Sebastian on 02-05-2009 | 1,015 Views

SQL Server - @@IDENTITY, SCOPE_IDENTITY() and IDENT_CURRENT()

The difference between @@IDENTITY and SCOPE_IDENTITY() is not very clear to many people and they often face problems due to the incorrect usage of @@IDENTITY. The primary difference between @@IDENTITY, SCOPE_IDENTITY() and IDENT_CURRENT() is the scope...
by Jacob Sebastian on 02-05-2009 | 1,212 Views

SQL Server - How to find out the SEED and INCREMENT values of an IDENTITY column?

Every IDENTITY column has two basic attributes: SEED and INCREMENT. The SEED attribute stores the ROOT or Starting value. INCREMENT specifies the value to be added to the current IDENTITY value to generate the next value. The default value of both these...
by Jacob Sebastian on 02-03-2009 | 1,237 Views

SQL Server - IDENTITY - Why do I have duplicate identity values?

IDENTITY columns are managed by SQL Server. SQL Server generates a new value for every INSERT and does not generate DUPLICATE values. However, if you interfere with the management of IDENTITY values, you can land up with duplicate IDENTITY values. Let...
by Jacob Sebastian on 02-03-2009 | 1,043 Views

Copyright © Beyondrelational.com