<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; List All Missing Identity Values of Table in Database</title>
	<atom:link href="http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 10 Feb 2012 02:12:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-151541</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 29 Jul 2011 09:49:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-151541</guid>
		<description><![CDATA[Try this

select * from @t where ID_Code in
(
select ID_Code from @t 
where type in (&#039;A&#039;,&#039;B&#039;)
group by ID_Code 
having MIN(CreateDate)=MAX(CreateDate)
and COUNT(ID_Code)=2
)]]></description>
		<content:encoded><![CDATA[<p>Try this</p>
<p>select * from @t where ID_Code in<br />
(<br />
select ID_Code from @t<br />
where type in (&#8216;A&#8217;,'B&#8217;)<br />
group by ID_Code<br />
having MIN(CreateDate)=MAX(CreateDate)<br />
and COUNT(ID_Code)=2<br />
)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gail</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-151388</link>
		<dc:creator><![CDATA[Gail]]></dc:creator>
		<pubDate>Thu, 28 Jul 2011 20:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-151388</guid>
		<description><![CDATA[How to exclude data if Type in (&#039;A&#039;, &#039;B&#039;) within same ID_Code and CreateDate columns. Here is value;

ID_Code     Type    CreateDate
1                 A          7/1/2011
1                 B          7/5/2011
1                 C          7/2/2011
2                 A          7/12/2011
2                 B          7/12/2011
2                 D          7/14/2011
3                 A          7/12/2011

Expected excluded data results should be this;

2                 A          7/12/2011
2                 B          7/12/2011
2                 D          7/14/2011]]></description>
		<content:encoded><![CDATA[<p>How to exclude data if Type in (&#8216;A&#8217;, &#8216;B&#8217;) within same ID_Code and CreateDate columns. Here is value;</p>
<p>ID_Code     Type    CreateDate<br />
1                 A          7/1/2011<br />
1                 B          7/5/2011<br />
1                 C          7/2/2011<br />
2                 A          7/12/2011<br />
2                 B          7/12/2011<br />
2                 D          7/14/2011<br />
3                 A          7/12/2011</p>
<p>Expected excluded data results should be this;</p>
<p>2                 A          7/12/2011<br />
2                 B          7/12/2011<br />
2                 D          7/14/2011</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-146903</link>
		<dc:creator><![CDATA[Tom]]></dc:creator>
		<pubDate>Fri, 08 Jul 2011 14:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-146903</guid>
		<description><![CDATA[SELECT ID+1 FROM Tablename T1
WHERE NOT EXISTS
( SELECT ID FROM Tablename T2 WHERE T2.ID = T1.ID+1 )
EXCEPT
SELECT MAX(ID)+1 FROM Tablename]]></description>
		<content:encoded><![CDATA[<p>SELECT ID+1 FROM Tablename T1<br />
WHERE NOT EXISTS<br />
( SELECT ID FROM Tablename T2 WHERE T2.ID = T1.ID+1 )<br />
EXCEPT<br />
SELECT MAX(ID)+1 FROM Tablename</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-146901</link>
		<dc:creator><![CDATA[Tom]]></dc:creator>
		<pubDate>Fri, 08 Jul 2011 14:01:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-146901</guid>
		<description><![CDATA[SELECT repeating_payment_id+1  
FROM pmnt_repeating_payment PRP1
WHERE NOT EXISTS
( SELECT repeating_payment_id FROM pmnt_repeating_payment PRP2 WHERE PRP2.repeating_payment_id = PRP1.repeating_payment_id+1 )
EXCEPT
SELECT MAX(repeating_payment_id) + 1
FROM pmnt_repeating_payment]]></description>
		<content:encoded><![CDATA[<p>SELECT repeating_payment_id+1<br />
FROM pmnt_repeating_payment PRP1<br />
WHERE NOT EXISTS<br />
( SELECT repeating_payment_id FROM pmnt_repeating_payment PRP2 WHERE PRP2.repeating_payment_id = PRP1.repeating_payment_id+1 )<br />
EXCEPT<br />
SELECT MAX(repeating_payment_id) + 1<br />
FROM pmnt_repeating_payment</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunil Somani</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-146131</link>
		<dc:creator><![CDATA[Sunil Somani]]></dc:creator>
		<pubDate>Tue, 05 Jul 2011 13:23:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-146131</guid>
		<description><![CDATA[DECLARE @ID INT
DECLARE @MaxID INT
DECLARE @MissingCarTypeIDs TABLE ( [ID] INT )

SELECT @MaxID = [ID] FROM Missingids

SET @ID = 1
WHILE @ID &lt;= @MaxID
BEGIN
    IF NOT EXISTS (SELECT &#039;X&#039; FROM Missingids
                   WHERE [ID] = @ID)
        INSERT INTO @MissingCarTypeIDs ( [ID] )
        VALUES ( @ID )

    SET @ID = @ID + 1
END

SELECT * FROM @MissingCarTypeIDs]]></description>
		<content:encoded><![CDATA[<p>DECLARE @ID INT<br />
DECLARE @MaxID INT<br />
DECLARE @MissingCarTypeIDs TABLE ( [ID] INT )</p>
<p>SELECT @MaxID = [ID] FROM Missingids</p>
<p>SET @ID = 1<br />
WHILE @ID &lt;= @MaxID<br />
BEGIN<br />
    IF NOT EXISTS (SELECT &#039;X&#039; FROM Missingids<br />
                   WHERE [ID] = @ID)<br />
        INSERT INTO @MissingCarTypeIDs ( [ID] )<br />
        VALUES ( @ID )</p>
<p>    SET @ID = @ID + 1<br />
END</p>
<p>SELECT * FROM @MissingCarTypeIDs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar Harsh</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-135212</link>
		<dc:creator><![CDATA[Kumar Harsh]]></dc:creator>
		<pubDate>Thu, 19 May 2011 08:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-135212</guid>
		<description><![CDATA[you can do this with Recursive CTE also,

Declare @t table (ColId varchar (20))
insert into @t
Select &#039;EC0001&#039; union all
Select &#039;EC0012&#039; 


;With CTE as
(Select CAST(STUFF(MAX(ColId), 1,2,&#039;&#039;) AS INT) colid from @t
union all
Select  colid-1 colid from CTE where (colid-1)&gt;=1    )
Select &#039;EC&#039;+ replicate(&#039;0&#039;,6-len(min(colid)))+cast(min(colid) as varchar) from CTE where 
colid not in (Select stuff(colid,1,2,null) from @t)]]></description>
		<content:encoded><![CDATA[<p>you can do this with Recursive CTE also,</p>
<p>Declare @t table (ColId varchar (20))<br />
insert into @t<br />
Select &#8216;EC0001&#8242; union all<br />
Select &#8216;EC0012&#8242; </p>
<p>;With CTE as<br />
(Select CAST(STUFF(MAX(ColId), 1,2,&#8221;) AS INT) colid from @t<br />
union all<br />
Select  colid-1 colid from CTE where (colid-1)&gt;=1    )<br />
Select &#8216;EC&#8217;+ replicate(&#8217;0&#8242;,6-len(min(colid)))+cast(min(colid) as varchar) from CTE where<br />
colid not in (Select stuff(colid,1,2,null) from @t)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: james angelo</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-60821</link>
		<dc:creator><![CDATA[james angelo]]></dc:creator>
		<pubDate>Mon, 08 Feb 2010 03:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-60821</guid>
		<description><![CDATA[helo all, i want to ask about tags.... can you answer?.....thats all i love you meen love you very much....]]></description>
		<content:encoded><![CDATA[<p>helo all, i want to ask about tags&#8230;. can you answer?&#8230;..thats all i love you meen love you very much&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: james angelo</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-60820</link>
		<dc:creator><![CDATA[james angelo]]></dc:creator>
		<pubDate>Mon, 08 Feb 2010 03:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-60820</guid>
		<description><![CDATA[i love you men.... feeling genius man ka oie..]]></description>
		<content:encoded><![CDATA[<p>i love you men&#8230;. feeling genius man ka oie..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitesh Oswal</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-57822</link>
		<dc:creator><![CDATA[Mitesh Oswal]]></dc:creator>
		<pubDate>Mon, 23 Nov 2009 13:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-57822</guid>
		<description><![CDATA[SET NOCOUNT ON


--Create an table in which we can add identity and Values.
IF OBJECT_ID(&#039;tblNumbers&#039;) IS NOT NULL
BEGIN
	DROP TABLE tblNumbers
END

CREATE TABLE tblNumbers
(
	ID	INT IDENTITY(1,1) PRIMARY KEY,
	VALUE	VARCHAR(20)

)



--Create an table in which we can add numbers.
IF OBJECT_ID(&#039;tblAllNumbers&#039;) IS NOT NULL
BEGIN
	DROP TABLE tblAllNumbers
END

CREATE TABLE tblAllNumbers
(
	NUMBER	INT PRIMARY KEY

)
--Create an Number table upto 15,00,000
INSERT INTO tblAllNumbers

SELECT TOP 1500000 ROW_NUMBER() OVER(ORDER BY SC.ID)  FROM sys.sysobjects SC , Sys.sysobjects SC1

DECLARE @int INT,@MaxRowXount	INT

--Insert Row data into tblNumbers
SELECT @int	=	1



WHILE @int	 0



SELECT @MaxRowXount	=	MAX(ID)	FROM tblNumbers

--Now Check for Missing Identity.

SELECT TA.NUMBER FROM tblAllNumbers TA LEFT JOIN tblNumbers TN 

ON
	TA.NUMBER	=	TN.ID

WHERE
	TA.NUMBER &lt;= @MaxRowXount AND
	TN.ID IS NULL
ORDER BY 
		TA.NUMBER]]></description>
		<content:encoded><![CDATA[<p>SET NOCOUNT ON</p>
<p>&#8211;Create an table in which we can add identity and Values.<br />
IF OBJECT_ID(&#8216;tblNumbers&#8217;) IS NOT NULL<br />
BEGIN<br />
	DROP TABLE tblNumbers<br />
END</p>
<p>CREATE TABLE tblNumbers<br />
(<br />
	ID	INT IDENTITY(1,1) PRIMARY KEY,<br />
	VALUE	VARCHAR(20)</p>
<p>)</p>
<p>&#8211;Create an table in which we can add numbers.<br />
IF OBJECT_ID(&#8216;tblAllNumbers&#8217;) IS NOT NULL<br />
BEGIN<br />
	DROP TABLE tblAllNumbers<br />
END</p>
<p>CREATE TABLE tblAllNumbers<br />
(<br />
	NUMBER	INT PRIMARY KEY</p>
<p>)<br />
&#8211;Create an Number table upto 15,00,000<br />
INSERT INTO tblAllNumbers</p>
<p>SELECT TOP 1500000 ROW_NUMBER() OVER(ORDER BY SC.ID)  FROM sys.sysobjects SC , Sys.sysobjects SC1</p>
<p>DECLARE @int INT,@MaxRowXount	INT</p>
<p>&#8211;Insert Row data into tblNumbers<br />
SELECT @int	=	1</p>
<p>WHILE @int	 0</p>
<p>SELECT @MaxRowXount	=	MAX(ID)	FROM tblNumbers</p>
<p>&#8211;Now Check for Missing Identity.</p>
<p>SELECT TA.NUMBER FROM tblAllNumbers TA LEFT JOIN tblNumbers TN </p>
<p>ON<br />
	TA.NUMBER	=	TN.ID</p>
<p>WHERE<br />
	TA.NUMBER &lt;= @MaxRowXount AND<br />
	TN.ID IS NULL<br />
ORDER BY<br />
		TA.NUMBER</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hima</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-56082</link>
		<dc:creator><![CDATA[Hima]]></dc:creator>
		<pubDate>Wed, 23 Sep 2009 10:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-56082</guid>
		<description><![CDATA[While we are migrating master data from one server to another identity column place major role. We might need the same values as IDs to be uploaded to production server from devserver. If production server table misses some identity values that are there in dev server then we may need to identify missing idenity columns]]></description>
		<content:encoded><![CDATA[<p>While we are migrating master data from one server to another identity column place major role. We might need the same values as IDs to be uploaded to production server from devserver. If production server table misses some identity values that are there in dev server then we may need to identify missing idenity columns</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Namrata</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-55938</link>
		<dc:creator><![CDATA[Namrata]]></dc:creator>
		<pubDate>Thu, 17 Sep 2009 10:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-55938</guid>
		<description><![CDATA[This was just what I was looking for...though I wanted the details for just 1 table..and I tweeked it accordingly...but the logic was ready and available
This was of great help...]]></description>
		<content:encoded><![CDATA[<p>This was just what I was looking for&#8230;though I wanted the details for just 1 table..and I tweeked it accordingly&#8230;but the logic was ready and available<br />
This was of great help&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Find Gaps in The Sequence Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-55630</link>
		<dc:creator><![CDATA[SQL SERVER – Find Gaps in The Sequence Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Sun, 06 Sep 2009 01:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-55630</guid>
		<description><![CDATA[[...] SQL SERVER – List All Missing Identity Values of Table in Database [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER – List All Missing Identity Values of Table in Database [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Willis</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-55278</link>
		<dc:creator><![CDATA[Willis]]></dc:creator>
		<pubDate>Wed, 26 Aug 2009 23:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-55278</guid>
		<description><![CDATA[As for one example where a missing identity column definition can cause problems...if you have a script doing an INSERT INTO you MUST have all of the columns defined in the insert statement or an error will result--EXCEPT if one of the columns is an IDENTITY column. In fact, if this script is inside a stored procedure the sp will not even compile, telling you that a column is missing. Of course, you can screw around in your script generating the next number for an insert for the column and make sure it&#039;s in the list of columns of the INSERT INTO...but setting the column property correctly is sure a lot easier and more efficient.

Now I had a different problem that was solved by this script. I was trying to rebuild an entire database manually. Don&#039;t ask why, I just had to do it. I was able to script out all of the tables, procedures, keys, functions, etc., and import all of the data. But I needed to know what tables in the source db had identity columns. This script gave me the answer. Excellent work!]]></description>
		<content:encoded><![CDATA[<p>As for one example where a missing identity column definition can cause problems&#8230;if you have a script doing an INSERT INTO you MUST have all of the columns defined in the insert statement or an error will result&#8211;EXCEPT if one of the columns is an IDENTITY column. In fact, if this script is inside a stored procedure the sp will not even compile, telling you that a column is missing. Of course, you can screw around in your script generating the next number for an insert for the column and make sure it&#8217;s in the list of columns of the INSERT INTO&#8230;but setting the column property correctly is sure a lot easier and more efficient.</p>
<p>Now I had a different problem that was solved by this script. I was trying to rebuild an entire database manually. Don&#8217;t ask why, I just had to do it. I was able to script out all of the tables, procedures, keys, functions, etc., and import all of the data. But I needed to know what tables in the source db had identity columns. This script gave me the answer. Excellent work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sinix</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54762</link>
		<dc:creator><![CDATA[Sinix]]></dc:creator>
		<pubDate>Wed, 12 Aug 2009 02:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54762</guid>
		<description><![CDATA[Hmmm... it&#039;s overkill.

SELECT ID+1 FROM Tablename T1
  WHERE NOT EXISTS
  ( SELECT ID FROM Tablename T2 WHERE T2.ID = T1.ID+1 )

KISS, isn&#039;t it?;)

// You may add additional check to exclude last value (it equals identcurrent for Tablename)]]></description>
		<content:encoded><![CDATA[<p>Hmmm&#8230; it&#8217;s overkill.</p>
<p>SELECT ID+1 FROM Tablename T1<br />
  WHERE NOT EXISTS<br />
  ( SELECT ID FROM Tablename T2 WHERE T2.ID = T1.ID+1 )</p>
<p>KISS, isn&#8217;t it?;)</p>
<p>// You may add additional check to exclude last value (it equals identcurrent for Tablename)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Discussion – Effect of Missing Identity on System – Real World Scenario Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54707</link>
		<dc:creator><![CDATA[SQL SERVER – Discussion – Effect of Missing Identity on System – Real World Scenario Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Tue, 11 Aug 2009 01:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54707</guid>
		<description><![CDATA[[...] a script, which will list all the missing identity values of a table in a database. In this post, I asked my readers if any could write a similar or better script. The results were interesting. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] a script, which will list all the missing identity values of a table in a database. In this post, I asked my readers if any could write a similar or better script. The results were interesting. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sindhuramesh</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54504</link>
		<dc:creator><![CDATA[sindhuramesh]]></dc:creator>
		<pubDate>Thu, 06 Aug 2009 06:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54504</guid>
		<description><![CDATA[i know the details about SQL from this blog. the above question is very useful to me. your blog is very useful to know the answer to that question. thank you so much. In SQl lot of unknown details are there. so i watch this site regularly to know lot. SQL server is very useful database when compared with other]]></description>
		<content:encoded><![CDATA[<p>i know the details about SQL from this blog. the above question is very useful to me. your blog is very useful to know the answer to that question. thank you so much. In SQl lot of unknown details are there. so i watch this site regularly to know lot. SQL server is very useful database when compared with other</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sindhuramesh</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54503</link>
		<dc:creator><![CDATA[sindhuramesh]]></dc:creator>
		<pubDate>Thu, 06 Aug 2009 06:13:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54503</guid>
		<description><![CDATA[i know the details about SQL from this blog. the above question is very useful to me. your blog is very useful to know the answer to that question. thank you so much. In SQl lot of unknown details are there. so i watch this site regularly to know lot.]]></description>
		<content:encoded><![CDATA[<p>i know the details about SQL from this blog. the above question is very useful to me. your blog is very useful to know the answer to that question. thank you so much. In SQl lot of unknown details are there. so i watch this site regularly to know lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shauib</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54327</link>
		<dc:creator><![CDATA[Shauib]]></dc:creator>
		<pubDate>Fri, 31 Jul 2009 14:01:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54327</guid>
		<description><![CDATA[Thanks for the great tips. They make life so easy.
Keep up the great work.]]></description>
		<content:encoded><![CDATA[<p>Thanks for the great tips. They make life so easy.<br />
Keep up the great work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54243</link>
		<dc:creator><![CDATA[Ashish]]></dc:creator>
		<pubDate>Thu, 30 Jul 2009 05:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54243</guid>
		<description><![CDATA[Yea also agreed from what Jacob Sir says usually we just start solving the things without asking why people need it, but its good  to find a real world example where we really use it and do tell other peoples about it...]]></description>
		<content:encoded><![CDATA[<p>Yea also agreed from what Jacob Sir says usually we just start solving the things without asking why people need it, but its good  to find a real world example where we really use it and do tell other peoples about it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijaya Kadiyala</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54223</link>
		<dc:creator><![CDATA[Vijaya Kadiyala]]></dc:creator>
		<pubDate>Wed, 29 Jul 2009 18:27:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54223</guid>
		<description><![CDATA[Hi,

I couldn&#039;t find any reason why we need to find out missing identity values. I have gone thru various forums but no luck. 

Every SQL expert says Why do you care about missing values :D...]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I couldn&#8217;t find any reason why we need to find out missing identity values. I have gone thru various forums but no luck. </p>
<p>Every SQL expert says Why do you care about missing values :D&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Sebastian</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54192</link>
		<dc:creator><![CDATA[Jacob Sebastian]]></dc:creator>
		<pubDate>Wed, 29 Jul 2009 06:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54192</guid>
		<description><![CDATA[Hi Imran,
You are right and most of us  do the same on the forums. When I see a post, usually I provide a solution, without asking &#039;why&#039; the OP actually needed it. And I think that is a decent way of supporting the community.

This discussion came not as a criticism to the &#039;excellent&#039; script provided for download. But it was more focusing on a &#039;learning&#039; excercise. IDENTITIES are discussed over a million times in SQL Server blogs. Though identities are looked as a trivial subject, it is not so. We once did a 1 hour Quiz session on IDENTITIES. 

The discussion I started was with the intention to see if there are any REAL-LIFE example where a missing identity sequence can really create a problem. 

regards
Jacob]]></description>
		<content:encoded><![CDATA[<p>Hi Imran,<br />
You are right and most of us  do the same on the forums. When I see a post, usually I provide a solution, without asking &#8216;why&#8217; the OP actually needed it. And I think that is a decent way of supporting the community.</p>
<p>This discussion came not as a criticism to the &#8216;excellent&#8217; script provided for download. But it was more focusing on a &#8216;learning&#8217; excercise. IDENTITIES are discussed over a million times in SQL Server blogs. Though identities are looked as a trivial subject, it is not so. We once did a 1 hour Quiz session on IDENTITIES. </p>
<p>The discussion I started was with the intention to see if there are any REAL-LIFE example where a missing identity sequence can really create a problem. </p>
<p>regards<br />
Jacob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54186</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Wed, 29 Jul 2009 05:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54186</guid>
		<description><![CDATA[Again, there are two things still open.

1) Alternate way of this script.
2) Example where logic is dependent on identity column.

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Again, there are two things still open.</p>
<p>1) Alternate way of this script.<br />
2) Example where logic is dependent on identity column.</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54185</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Wed, 29 Jul 2009 05:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54185</guid>
		<description><![CDATA[Imran,

Very nice comment Imran. 

As you said, this can be for sure helpful to debug. I have personally once seen issue where someone was relying on identity to to assign them seats in events. In fact, it should be depending on Count(*).

One more example, I remember when one of the ID was missing and company owner&#039;s superstitious nature was not happy with it.

Well, above two reasons does not quality but debugging for sure help out.

Again, writing script has nothing to do with expertise. We want to train our brain and that is why we try to solve puzzles. 

Great work Imran! At present no one else has attempted to solve this puzzle.

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Imran,</p>
<p>Very nice comment Imran. </p>
<p>As you said, this can be for sure helpful to debug. I have personally once seen issue where someone was relying on identity to to assign them seats in events. In fact, it should be depending on Count(*).</p>
<p>One more example, I remember when one of the ID was missing and company owner&#8217;s superstitious nature was not happy with it.</p>
<p>Well, above two reasons does not quality but debugging for sure help out.</p>
<p>Again, writing script has nothing to do with expertise. We want to train our brain and that is why we try to solve puzzles. </p>
<p>Great work Imran! At present no one else has attempted to solve this puzzle.</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54184</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Wed, 29 Jul 2009 04:58:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54184</guid>
		<description><![CDATA[Hello All, 

Thanks Pinal for keeping this script  to download on your blog.

Thanks for those who actually saw this script and gave missed comments.

Now response for all above questions. 

I do not want to show off, But to be honest, When I see a question posted in this blog, I don&#039;t give a second thought, Why, What, When, Where .... NO, But I straight away start, working on the question.

Few Questions that I find very good and if I feel I developed a good script for such a question, then I sent that script to Pinal requesting him to publish. 

For this specific question, I did not think why user needed this info, I found this question challenging and I gave a solution. 

There could be many reasons to find out why we need this info, If you use Identity property as your most unique column and Transaction Identifier, then definitely you would want to know why few transaction did not completely, Is there any specific fashion these transaction fails (Can be found out looking at missing values of identity)..... Could be helpful to debug.


~ IM.]]></description>
		<content:encoded><![CDATA[<p>Hello All, </p>
<p>Thanks Pinal for keeping this script  to download on your blog.</p>
<p>Thanks for those who actually saw this script and gave missed comments.</p>
<p>Now response for all above questions. </p>
<p>I do not want to show off, But to be honest, When I see a question posted in this blog, I don&#8217;t give a second thought, Why, What, When, Where &#8230;. NO, But I straight away start, working on the question.</p>
<p>Few Questions that I find very good and if I feel I developed a good script for such a question, then I sent that script to Pinal requesting him to publish. </p>
<p>For this specific question, I did not think why user needed this info, I found this question challenging and I gave a solution. </p>
<p>There could be many reasons to find out why we need this info, If you use Identity property as your most unique column and Transaction Identifier, then definitely you would want to know why few transaction did not completely, Is there any specific fashion these transaction fails (Can be found out looking at missing values of identity)&#8230;.. Could be helpful to debug.</p>
<p>~ IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ashishgilhotra</title>
		<link>http://blog.sqlauthority.com/2009/07/27/sql-server-list-all-missing-identity-values-of-table-in-database/#comment-54167</link>
		<dc:creator><![CDATA[ashishgilhotra]]></dc:creator>
		<pubDate>Tue, 28 Jul 2009 11:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6339#comment-54167</guid>
		<description><![CDATA[i think till then developers don&#039;t make assumptions like that  
&quot; Next order must be +1 then previous one &quot; or &quot;customerid is always in sequence&quot; till then these assumptions are not made by developer. Well still looking for some other problems arouses by Missing or Non-Sequential Identity value in identity columns. :)]]></description>
		<content:encoded><![CDATA[<p>i think till then developers don&#8217;t make assumptions like that<br />
&#8221; Next order must be +1 then previous one &#8221; or &#8220;customerid is always in sequence&#8221; till then these assumptions are not made by developer. Well still looking for some other problems arouses by Missing or Non-Sequential Identity value in identity columns. :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

