<?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>SQL-Scripts | Varinder Sandhu</title>
	<atom:link href="https://varindersandhu.in/category/sql/sql-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>https://varindersandhu.in</link>
	<description>Keep it Simple and Smart</description>
	<lastBuildDate>Wed, 29 Aug 2018 05:27:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://varindersandhu.in/wp-content/uploads/2020/05/varindersandhu_favicon.ico</url>
	<title>SQL-Scripts | Varinder Sandhu</title>
	<link>https://varindersandhu.in</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">22788835</site>	<item>
		<title>SQL Server &#8211; How to read the SQL Server Error log files using TSQL</title>
		<link>https://varindersandhu.in/2014/11/11/sql-server-how-to-read-the-sql-server-error-log-files-using-tsql/</link>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Tue, 11 Nov 2014 10:04:51 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-Advanced]]></category>
		<category><![CDATA[SQL-Query]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Agent Error]]></category>
		<category><![CDATA[SQL Server Error Log]]></category>
		<category><![CDATA[SQL Server Log Files]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=3563</guid>

					<description><![CDATA[<p>There is undocumented system stored procedure sp_readerrorlog which allows us to read the SQL Server error log files directly using T-SQL. This procedure has total 7 parameters as given below: Parameter Values First Parameter Value of error log file you want to read: 0 = current, 1 = Archive #1,</p>
<p>The post <a href="https://varindersandhu.in/2014/11/11/sql-server-how-to-read-the-sql-server-error-log-files-using-tsql/">SQL Server – How to read the SQL Server Error log files using TSQL</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3563</post-id>	</item>
		<item>
		<title>SQL Server – How Like operator work with datetime</title>
		<link>https://varindersandhu.in/2013/02/12/sql-server-how-like-operator-work-with-datetime/</link>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Tue, 12 Feb 2013 17:25:11 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Query]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[DateTime]]></category>
		<category><![CDATA[Like Operator]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2754</guid>

					<description><![CDATA[<p>Today, my one of the friend shared a very interesting fact about like operator. With the help of this post I am sharing with you all. We need to convert it to character data while comparing with the like operator. Let‘s check with example Like operator with datetime Like Operator</p>
<p>The post <a href="https://varindersandhu.in/2013/02/12/sql-server-how-like-operator-work-with-datetime/">SQL Server – How Like operator work with datetime</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2754</post-id>	</item>
		<item>
		<title>SQL Server &#8211; How to add column dynamically in where clause</title>
		<link>https://varindersandhu.in/2012/12/04/sql-server-how-to-add-column-dynamically-in-where-clause/</link>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Tue, 04 Dec 2012 14:44:11 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-Advanced]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Query]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[add column dynamically]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[where clause]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2672</guid>

					<description><![CDATA[<p>In this post, we will learn with example how to add the column dynamically in where clause. Example: For demo we have table as shown in the snapshot Basically we want to execute following script (i.e. Script: 1) but column name (i.e. FIRST_NAME) added dynamically in where clause. Script: 1</p>
<p>The post <a href="https://varindersandhu.in/2012/12/04/sql-server-how-to-add-column-dynamically-in-where-clause/">SQL Server – How to add column dynamically in where clause</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2672</post-id>	</item>
		<item>
		<title>SQL Server &#8211; The multi-part identifier could not be bound State &#8211; Msg 4104 &#8211; Fix</title>
		<link>https://varindersandhu.in/2012/11/23/sql-server-the-multi-part-identifier-could-not-be-bound-state-msg-4104-fix/</link>
					<comments>https://varindersandhu.in/2012/11/23/sql-server-the-multi-part-identifier-could-not-be-bound-state-msg-4104-fix/#comments</comments>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Fri, 23 Nov 2012 10:28:43 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-Advanced]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Query]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[Msg 4104]]></category>
		<category><![CDATA[multi-part identifier]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2664</guid>

					<description><![CDATA[<p>Error Msg Server: Msg 4104, Level 16, State 1, Line 1 The multi-part identifier could not be bound. Cause of this Error Msg: Case: 1 This error usually occurs when an alias is used when referencing a column in a SELECT statement and the alias used is not defined anywhere</p>
<p>The post <a href="https://varindersandhu.in/2012/11/23/sql-server-the-multi-part-identifier-could-not-be-bound-state-msg-4104-fix/">SQL Server – The multi-part identifier could not be bound State – Msg 4104 – Fix</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
					<wfw:commentRss>https://varindersandhu.in/2012/11/23/sql-server-the-multi-part-identifier-could-not-be-bound-state-msg-4104-fix/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2664</post-id>	</item>
		<item>
		<title>SQL Server &#8211; Generate Row Number in Select and Select into</title>
		<link>https://varindersandhu.in/2012/08/30/sql-server-generate-row-number-in-select-and-select-into/</link>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Thu, 30 Aug 2012 11:24:40 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-Advanced]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Query]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[Row Number]]></category>
		<category><![CDATA[Select into]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2555</guid>

					<description><![CDATA[<p>How to Generate the Row Number in Select and Select into script? Using IDENTITY for Select Into SELECT RowNumber=IDENTITY(int,1,1),FIRST_NAME,LAST_NAME into EMPLOYEE_backup FROM EMPLOYEE Using Row_Number() for Select SELECT ROW_NUMBER() OVER (ORDER BY ID ASC) RowNumber, FIRST_NAME,LAST_NAME FROM EMPLOYEE Using Row_Number() for Select into SELECT ROW_NUMBER() OVER (ORDER BY ID ASC)</p>
<p>The post <a href="https://varindersandhu.in/2012/08/30/sql-server-generate-row-number-in-select-and-select-into/">SQL Server – Generate Row Number in Select and Select into</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2555</post-id>	</item>
		<item>
		<title>SQL Server 2008 &#8211; How to copy a Table</title>
		<link>https://varindersandhu.in/2012/07/09/sql-server-2008-how-to-copy-a-table/</link>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Mon, 09 Jul 2012 10:08:13 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[Copy Table]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2455</guid>

					<description><![CDATA[<p>Lets see how to copy an existing table to new table in SQL Server. There are two options. Copy the table with Data. Copy the table without data (i.e.Table Structure Only) -- Create Table CREATE TABLE EMPLOYEE ( ID INT NOT NULL, FIRST_NAME VARCHAR(10), LAST_NAME VARCHAR(10) ); &#160; -- INSERT</p>
<p>The post <a href="https://varindersandhu.in/2012/07/09/sql-server-2008-how-to-copy-a-table/">SQL Server 2008 – How to copy a Table</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2455</post-id>	</item>
		<item>
		<title>SQL Server &#8211; NEWID () vs. NEWSEQUENTIALID ()</title>
		<link>https://varindersandhu.in/2012/06/18/sql-server-newid-vs-newsequentialid/</link>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Mon, 18 Jun 2012 16:57:05 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-Advanced]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[GUID]]></category>
		<category><![CDATA[NEWID]]></category>
		<category><![CDATA[NEWSEQUENTIALID]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2432</guid>

					<description><![CDATA[<p>NEWID () NEWID () creates a unique value of type uniqueidentifier. NEWID () can be referenced in the queries. Example: NEWSEQUENTIALID () NEWSEQUENTIALID () creates a GUID that is greater than any GUID previously generated by this function on a specified computer since Windows was started. After restarting Windows, the</p>
<p>The post <a href="https://varindersandhu.in/2012/06/18/sql-server-newid-vs-newsequentialid/">SQL Server – NEWID () vs. NEWSEQUENTIALID ()</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2432</post-id>	</item>
		<item>
		<title>SQL Server 2008 &#8211; Get the next Identity Value</title>
		<link>https://varindersandhu.in/2012/06/01/sql-server-2008-get-the-next-identity-value/</link>
					<comments>https://varindersandhu.in/2012/06/01/sql-server-2008-get-the-next-identity-value/#comments</comments>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Fri, 01 Jun 2012 16:15:37 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-Advanced]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[IDENT_CURRENT]]></category>
		<category><![CDATA[IDENT_INCR]]></category>
		<category><![CDATA[Identity Value]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2400</guid>

					<description><![CDATA[<p>Question: How to get the next Identity Value in SQL Server 2008? Answer: It is very simple to the get the identity value in SQL Server. Let’s see with the example below Lets‘s create some dummy data as mentioned below … In SQ Server, there are two functions IDENT_CURRENT and</p>
<p>The post <a href="https://varindersandhu.in/2012/06/01/sql-server-2008-get-the-next-identity-value/">SQL Server 2008 – Get the next Identity Value</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
					<wfw:commentRss>https://varindersandhu.in/2012/06/01/sql-server-2008-get-the-next-identity-value/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2400</post-id>	</item>
		<item>
		<title>SQL SERVER – 2008 – Inline Variable Assignment – Declare and Assign Variable</title>
		<link>https://varindersandhu.in/2012/05/04/sql-server-2008-inline-variable-assignment-declare-and-assign-variable/</link>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Fri, 04 May 2012 10:03:18 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-General]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[Declare]]></category>
		<category><![CDATA[Inline Variable Assignment]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Variable Assignment]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2365</guid>

					<description><![CDATA[<p>Inline variable assignment is available in SQL Server 2008 or higher version. Beside this is very simple but very useful feature. Many of the programming languages have this feature. But now SQL Server 2008 or higher version has this feature. Example: ---- SQL Server 2005 or earlier versions DECLARE @var1</p>
<p>The post <a href="https://varindersandhu.in/2012/05/04/sql-server-2008-inline-variable-assignment-declare-and-assign-variable/">SQL SERVER – 2008 – Inline Variable Assignment – Declare and Assign Variable</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2365</post-id>	</item>
		<item>
		<title>SQL Server 2008 – Database Backup Compression</title>
		<link>https://varindersandhu.in/2012/04/27/sql-server-2008-database-backup-compression/</link>
					<comments>https://varindersandhu.in/2012/04/27/sql-server-2008-database-backup-compression/#comments</comments>
		
		<dc:creator><![CDATA[Varinder Sandhu]]></dc:creator>
		<pubDate>Fri, 27 Apr 2012 09:48:56 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL-Advanced]]></category>
		<category><![CDATA[SQL-Backup & Restore]]></category>
		<category><![CDATA[SQL-Scripts]]></category>
		<category><![CDATA[SQL-Tips and Tricks]]></category>
		<category><![CDATA[Varinder Sandhu]]></category>
		<category><![CDATA[Backup Compression]]></category>
		<category><![CDATA[Database Backup]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://www.varindersandhu.in/?p=2355</guid>

					<description><![CDATA[<p>Backup compression was introduced in SQL Server 2008 Enterprise. At installation, backup compression default is set to 0, which makes backup compression off by default. To change the default to COMPRESSION, set backup compression default to 1. To revert the default to NO_COMPRESSION, set backup compression default back to 0.</p>
<p>The post <a href="https://varindersandhu.in/2012/04/27/sql-server-2008-database-backup-compression/">SQL Server 2008 – Database Backup Compression</a> first appeared on <a href="https://varindersandhu.in">Varinder Sandhu</a>.</p>]]></description>
		
					<wfw:commentRss>https://varindersandhu.in/2012/04/27/sql-server-2008-database-backup-compression/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2355</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 
Database Caching 19/133 queries in 0.032 seconds using Disk (Request-wide modification query)

Served from: varindersandhu.in @ 2025-10-30 14:20:46 by W3 Total Cache
-->