 




<?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>IT Answers &#187; SQL scripts</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/sql-server/sql-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 22:12:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Validate SQL and display the output</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/validate-sql-and-display-the-output/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/validate-sql-and-display-the-output/#comments</comments>
		<pubDate>Tue, 29 Jan 2013 08:14:02 +0000</pubDate>
		<dc:creator>RamvishakRamesh</dc:creator>
				<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL scripts]]></category>
		<category><![CDATA[SQLRPGLE]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/validate-sql-and-display-the-output/</guid>
		<description><![CDATA[New Answer by Michael Tidmarsh]]></description>
				<content:encoded><![CDATA[New Answer by Michael Tidmarsh]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/validate-sql-and-display-the-output/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Update a Date_Time Field</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/update-a-date_time-field/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/update-a-date_time-field/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 15:05:45 +0000</pubDate>
		<dc:creator>DJandLO</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2005]]></category>
		<category><![CDATA[SQL scripts]]></category>
		<category><![CDATA[SQL Server 2005]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I&#8217;m trying to update a DATE_TIME field to a NULL value. When I run the script below I get an error. Any ideas on what I&#8217;m missing? UPDATE Orders SET CONFIRMATION_DATE_TIME = &#8216; &#8216; WHERE ST_ID = 102690 ERROR: Msg 245, Level 16, State 1, Line 1 Syntax error converting the varchar value &#8216;Ê&#8217; to [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m trying to update a DATE_TIME field to a NULL value. When I run the script below I get an error. Any ideas on what I&#8217;m missing? <br/><br/> UPDATE Orders SET CONFIRMATION_DATE_TIME = &#8216; &#8216; WHERE ST_ID = 102690 <br/><br/> ERROR: Msg 245, Level 16, State 1, Line 1 Syntax error converting the varchar value &#8216;Ê&#8217; to a column of data type int. <br/><br/> Thanks!<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/update-a-date_time-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update SQL Server 2005 Scripts</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/update-scripts/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/update-scripts/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 13:19:50 +0000</pubDate>
		<dc:creator>DJandLO</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL scripts]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server Scripts]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I don&#8217;t right code &#038; don&#8217;t have the confidence to try on my own so, I&#8217;m asking for help. I need to run an update script to clear out the data from iweb_conf_demo.Attendee_ribbons. Then I’ll need to run multiple scripts to update multiple records on the same field iweb_conf_demo.Attendee_ribbons for different groups of registrants. For [...]]]></description>
				<content:encoded><![CDATA[<p>I don&#8217;t right code &#038; don&#8217;t have the confidence to try on my own so, I&#8217;m asking for help. </p>
<ul>
<li>I need to run an update script to clear out the data from iweb_conf_demo.Attendee_ribbons.</li>
<li>Then I’ll need to run multiple scripts to update multiple records on the same field iweb_conf_demo.Attendee_ribbons for different groups of registrants. For example ID # 123456, 123465, 654321 &#038; 543216 will need to be updated with the Code 0020 and Code 0650.
</li>
</ul>
<p>I’m not sure if this makes a difference or not but, the Code info comes from Gen_table.code.</p>
<p>Any assistance would be greatly appreciated &#8211; thanks!</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/update-scripts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Running a script against local SQL servers</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-servers-2/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/sql-servers-2/#comments</comments>
		<pubDate>Thu, 12 May 2011 19:59:41 +0000</pubDate>
		<dc:creator>Cerb30036</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Scripting]]></category>
		<category><![CDATA[SQL scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi guys i am trying to run a script against local servers stored on a txt file i have already used osql to list the output to a text file. but after this probs]]></description>
				<content:encoded><![CDATA[<p>Hi guys i am trying to run a script against local servers stored on a txt file i have already used osql to list the output to a text file. but after this probs</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/sql-servers-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create QA database with only some production tables</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/create-qa-database-with-only-some-production-tables/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/create-qa-database-with-only-some-production-tables/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 13:50:12 +0000</pubDate>
		<dc:creator>Rwaltz</dc:creator>
				<category><![CDATA[Clone database]]></category>
		<category><![CDATA[Filegroup]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[SQL scripts]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server tables]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I have a large database with some tables that have largely static data. I need to make a new database on a different server with the same table structure with the static data tables intact (keys, etc.). The other tables must be empty. They&#8217;re all in the same filegroup in the original database. I&#8217;ve done [...]]]></description>
				<content:encoded><![CDATA[<p>I have a large database with some tables that have largely static data.  I need to make a new database on a different server with the same table structure with the static data tables intact (keys, etc.).  The other tables must be empty.  They&#8217;re all in the same filegroup in the original database.  I&#8217;ve done this once, by some sort of partial (copy only?) backup and changing filenames&#8230; but I&#8217;ve lost the script and I can&#8217;t locate the original article (yes, I&#8217;m kicking myself).<br />
Thanks</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/create-qa-database-with-only-some-production-tables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mssql login script</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/mssql-login-script/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/mssql-login-script/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 20:29:49 +0000</pubDate>
		<dc:creator>LINSONAJ</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[PowerShell Scripts]]></category>
		<category><![CDATA[SQL 2005]]></category>
		<category><![CDATA[SQL scripts]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello, Can anyone give me a simplet powershell script to check login attempt to remote MSSQL database.For eg: if i have a database &#8220;db&#8221; in remote sql server say 192.168.1.10 which having username&#8221;test&#8221; and password as &#8220;password&#8221;.If the login is successful its output should shows as &#8220;OK&#8221; in powershell prompt itself or  as &#8220;FAIL&#8221;,if it [...]]]></description>
				<content:encoded><![CDATA[<p>Hello,</p>
<p>Can anyone give me a simplet powershell script to check login attempt to remote MSSQL database.For eg: if i have a database &#8220;db&#8221; in remote sql server say 192.168.1.10 which having username&#8221;test&#8221; and password as &#8220;password&#8221;.If the login is successful its output should shows as &#8220;OK&#8221; in powershell prompt itself or  as &#8220;FAIL&#8221;,if it fails to login.</p>
<p>Regards,<br />
Linson</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/mssql-login-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Script with hyphen in the value set</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-script-with-hyphen-in-the-value-set/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/sql-script-with-hyphen-in-the-value-set/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 21:03:18 +0000</pubDate>
		<dc:creator>Markmorgan47</dc:creator>
				<category><![CDATA[SQL Scripting]]></category>
		<category><![CDATA[SQL scripts]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[We have a particular piece of malware that will put some binary code in the HKLM/System/ControlSet001/Services/{5083B7D5-47AF-8FF9-657C651C2B10}/ I am using an sql script along with Microsofts logparser to parse some data out of the registry on a windows box and I am having trouble with the last bit of the code. The data is located at [...]]]></description>
				<content:encoded><![CDATA[<p>We have a particular piece of malware that will put some binary code in the HKLM/System/ControlSet001/Services/{5083B7D5-47AF-8FF9-657C651C2B10}/<br />
I am using an sql script along with Microsofts logparser to parse some data out of the registry on a windows box and I am having trouble with the last bit of the code.<br />
The data is located at HKLM/System/ControlSet001/Services/{5083B7D5-47AF-8FF9-657C651C2B10}/<br />
The date inside the parenthesis is never the same so my script looks like this.<br />
SELECT TOP 1000<br />
        ComputerName,<br />
        Path,<br />
        Keyname,<br />
        ValueName,<br />
        Valuetype,<br />
        Value,<br />
        Lastwritetime<br />
INTO *.-servi001ces.csv<br />
FROM \\$NAME$HKLMControlSet001Services{550D0230-5A10-46A2-B53E-6050E712BBCD}<br />
I get an error of &#8220;error opening key.<br />
The values inside the parenthesis is never the same and sql does not like the hyphens.  Is there a wildcard that can be used for each value and how do I get around the hyphen problem.<br />
I have tried the * for each value but no success.<br />
Mark</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/sql-script-with-hyphen-in-the-value-set/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Retreiving AS/400 SQL scripts</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/retreiving-as400-sql-sripts/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/retreiving-as400-sql-sripts/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 14:33:55 +0000</pubDate>
		<dc:creator>Morticia001</dc:creator>
				<category><![CDATA[i570]]></category>
		<category><![CDATA[iSeries SQL]]></category>
		<category><![CDATA[SQL commands]]></category>
		<category><![CDATA[SQL scripts]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[When I start sql on our iSeries, the system returns my previous scripts I have run. Which fle do these live in in the iSeries and can I report on them?]]></description>
				<content:encoded><![CDATA[<p>When I start sql on our iSeries, the system returns my previous scripts I have run. Which fle do these live in in the iSeries and can I report on them?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/retreiving-as400-sql-sripts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>dba deleting data</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/dba-deleting-data/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/dba-deleting-data/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 19:49:06 +0000</pubDate>
		<dc:creator>Biker01</dc:creator>
				<category><![CDATA[Database Administrator]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[SQL scripts]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Is part of a DBA&#8217;s job to delete production data using SQL scripts?]]></description>
				<content:encoded><![CDATA[<p>Is part of a DBA&#8217;s job to delete production data using SQL scripts?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/dba-deleting-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL script to disable views after a demo period.</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-script-to-disable-views-after-a-demo-period/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/sql-script-to-disable-views-after-a-demo-period/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 15:25:31 +0000</pubDate>
		<dc:creator>Katiekat</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL scripts]]></category>
		<category><![CDATA[SQL Server 2005]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi, I have a sql view that I created for someone on a test basis. I want to create something (stored procedure, trigger, etc) that will delete or disable this view after a 30 day trial period. I prefer to make the view unvisible even to the &#8220;sa&#8221; administrator so that the view can not [...]]]></description>
				<content:encoded><![CDATA[<p>Hi, I have a sql view that I created for someone on a test basis.  I want to create something (stored procedure, trigger, etc) that will delete or disable this view after a 30 day trial period.  I prefer to make the view unvisible even to the &#8220;sa&#8221; administrator so that the view can not be recreated by someone else.  Is this possible?  I am currently using SQL Server Management Studio 2005.  What is the best way to do that and what is the actual code?  This needs to run without the testers knowledge and without my presence.  </p>
<p>Your help is greatly appreciated.  I&#8217;ve been searching the web for weeks trying to figure this out and am up against a deadline of June 28, 2009.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/sql-script-to-disable-views-after-a-demo-period/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/26 queries in 0.039 seconds using memcached
Object Caching 925/1042 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 02:34:41 -->