<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zafar Iqbal &#187; SQL Server</title>
	<atom:link href="http://ziqbalbh.com/category/sqlserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://ziqbalbh.com</link>
	<description>To see the future you have to travel on the rough edge of experience.</description>
	<lastBuildDate>Tue, 26 Oct 2010 17:32:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Rollover logging in database</title>
		<link>http://ziqbalbh.com/sqlserver/2008/06/02/rollover-logging-in-database/</link>
		<comments>http://ziqbalbh.com/sqlserver/2008/06/02/rollover-logging-in-database/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 05:50:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2008/06/02/rollover-logging-in-database/</guid>
		<description><![CDATA[We are currently working on an application (window service), which grabs alerts data from a third party web application and parses each alert and process its status, reasons, and source for different attributes and then creates tickets for support staff. In this project we were logging all detail activities of parsing alerts into our database, [...]]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2008/06/02/rollover-logging-in-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Boolean algebra in SQL</title>
		<link>http://ziqbalbh.com/sqlserver/2008/05/16/using-boolean-algebra-in-sql/</link>
		<comments>http://ziqbalbh.com/sqlserver/2008/05/16/using-boolean-algebra-in-sql/#comments</comments>
		<pubDate>Fri, 16 May 2008 07:59:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Boolean Algebra]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2008/05/16/using-boolean-algebra-in-sql/</guid>
		<description><![CDATA[Recently I was working on a procedure which required that I marked some items in different categories, and then based on that marking we have to summarize items in different sections. I have extracted the main idea from this procedure for our example. It is using some Boolean algebra to segregate items into different sections. [...]]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2008/05/16/using-boolean-algebra-in-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bucketing consecutive numbers in a range</title>
		<link>http://ziqbalbh.com/sqlserver/2008/05/12/bucketing-consecutive-numbers-in-a-range/</link>
		<comments>http://ziqbalbh.com/sqlserver/2008/05/12/bucketing-consecutive-numbers-in-a-range/#comments</comments>
		<pubDate>Mon, 12 May 2008 08:17:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2008/05/12/bucketing-consecutive-numbers-in-a-range/</guid>
		<description><![CDATA[Recently we had a little tricky problem to solve. We were displaying a report in which we had to bucket numbers in a range, such that only consecutive numbers should be in that range, if any break is there, then a new range should start. Our first solution did not worked as required. Most difficult [...]]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2008/05/12/bucketing-consecutive-numbers-in-a-range/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mod operator puzzle</title>
		<link>http://ziqbalbh.com/sqlserver/2008/05/12/mod-operator-puzzle/</link>
		<comments>http://ziqbalbh.com/sqlserver/2008/05/12/mod-operator-puzzle/#comments</comments>
		<pubDate>Mon, 12 May 2008 07:12:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2008/05/12/mod-operator-puzzle/</guid>
		<description><![CDATA[Recently I saw a puzzle on SQL Server Central, I was intrigued to solve it myself, so here is what I was able to accomplish, and in less than 10 minutes. DECLARE @i int SET @i = 0 CREATE TABLE #X (val INT) WHILE @i &#60; 100 BEGIN SELECT @i = @i + 1 INSERT [...]]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2008/05/12/mod-operator-puzzle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate random number for each row</title>
		<link>http://ziqbalbh.com/sqlserver/2007/02/15/generate-random-number-for-each-row/</link>
		<comments>http://ziqbalbh.com/sqlserver/2007/02/15/generate-random-number-for-each-row/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 01:33:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2007/02/15/generate-random-number-for-each-row/</guid>
		<description><![CDATA[Today I had to add a new date column to one of my table, and populate it with some random entries. I found a script from SQL Team Blog about generating random numbers. I modified it a little and used it to populate these dates based on another date I had in my table. Here [...]]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2007/02/15/generate-random-number-for-each-row/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sequential Numbering/Counting of Records</title>
		<link>http://ziqbalbh.com/sqlserver/2007/02/09/sequential-numberingcounting-of-records/</link>
		<comments>http://ziqbalbh.com/sqlserver/2007/02/09/sequential-numberingcounting-of-records/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 06:43:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2007/02/09/sequential-numberingcounting-of-records/</guid>
		<description><![CDATA[Now say your table does not have an identify column, you don&#8217;t want to use a temporary table or alter your existing table, but you still would like to have a record number associated with each record. In this case you could use a self join to return a record number for each row. Here [...]]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2007/02/09/sequential-numberingcounting-of-records/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SCOPE_IDENTITY() and @@IDENTITY Demystified</title>
		<link>http://ziqbalbh.com/sqlserver/2007/02/09/scope_identity-and-identity-demystified/</link>
		<comments>http://ziqbalbh.com/sqlserver/2007/02/09/scope_identity-and-identity-demystified/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 06:37:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2008/05/12/scope_identity-and-identity-demystified/</guid>
		<description><![CDATA[I’ve run across several applications where the use of IDENTITY values has caused some confusion, specifically in how the @@IDENTITY function operates given external influences. We’ve all likely been faced with how to grab the newly generated IDENTITY value from a SQL Server database table. And there are a 2 popular techniques that accomplish this [...]]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2007/02/09/scope_identity-and-identity-demystified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting string to datetime</title>
		<link>http://ziqbalbh.com/sqlserver/2007/02/09/converting-string-to-datetime/</link>
		<comments>http://ziqbalbh.com/sqlserver/2007/02/09/converting-string-to-datetime/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 06:32:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2007/02/09/converting-string-to-datetime/</guid>
		<description><![CDATA[Here how you can convert string date to a datetime value: DECLARE @DateString char(14)SET @DateString = '20060703074815'SELECT CAST(SUBSTRING(@DateString, 1, 4) + '-' +SUBSTRING(@DateString, 5, 2) + '-' +SUBSTRING(@DateString, 7, 2) + 'T' +SUBSTRING(@DateString, 9, 2) + ':' +SUBSTRING(@DateString, 11, 2) + ':' +SUBSTRING(@DateString, 13, 2) AS datetime)]]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2007/02/09/converting-string-to-datetime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rowcount for each table</title>
		<link>http://ziqbalbh.com/sqlserver/2007/02/09/get-rowcount-for-each-table/</link>
		<comments>http://ziqbalbh.com/sqlserver/2007/02/09/get-rowcount-for-each-table/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 06:31:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2007/02/09/get-rowcount-for-each-table/</guid>
		<description><![CDATA[If you want to find row count for each table in your database without naming any table then use following script: exec sp_MSforeachtable 'select count(*) as nr_of_rows, ''?'' as table_name from ?']]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2007/02/09/get-rowcount-for-each-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find where a table is referenced?</title>
		<link>http://ziqbalbh.com/sqlserver/2007/02/09/how-to-find-where-a-table-is-referenced/</link>
		<comments>http://ziqbalbh.com/sqlserver/2007/02/09/how-to-find-where-a-table-is-referenced/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 06:24:00 +0000</pubDate>
		<dc:creator>Zafar Iqbal</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://ziqbalbh.com/sqlserver/2007/02/09/how-to-find-where-a-table-is-referenced/</guid>
		<description><![CDATA[When you need to find all procedures and function referencing a particular table then use following: SELECT o.name, t.TABLE_NAME, c.textFROM syscomments c JOIN sysobjects o ON c.id = o.id JOIN INFORMATION_SCHEMA.Tables t ON c.text LIKE '%'+t.TABLE_NAME+'%']]></description>
		<wfw:commentRss>http://ziqbalbh.com/sqlserver/2007/02/09/how-to-find-where-a-table-is-referenced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

