<?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>Answer My Searches &#187; win32</title>
	<atom:link href="http://www.answermysearches.com/category/win32/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.answermysearches.com</link>
	<description>Answers to everything I search for, every day</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>TSQL &#8211; Function to Split a Delimited String and Return a Field</title>
		<link>http://www.answermysearches.com/tsql-function-to-split-a-delimited-string-and-return-a-field/2225/</link>
		<comments>http://www.answermysearches.com/tsql-function-to-split-a-delimited-string-and-return-a-field/2225/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 18:35:04 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/?p=2225</guid>
		<description><![CDATA[Here is a MS SQL Server (T-SQL) user defined function to split up a delmited string, and return the index value you care about.
Example:
select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l',1)
returns:
'def'

CREATE FUNCTION dbo.GetValueOfSplitStringByIndex (@sep char(1), @s varchar(1540), @index int)
RETURNS varchar(1540)
AS
-- Takes a @sep separated string, turns it into a list internally and returns the value from that
-- list found at the [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a MS SQL Server (T-SQL) user defined function to split up a delmited string, and return the index value you care about.</p>
<p>Example:<br />
<code>select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l',1)</code><br />
returns:<br />
<code>'def'</code></p>
<pre>
CREATE FUNCTION dbo.GetValueOfSplitStringByIndex (@sep char(1), @s varchar(1540), @index int)
RETURNS varchar(1540)
AS
-- Takes a @sep separated string, turns it into a list internally and returns the value from that
-- list found at the @index location.  Null is return if that @index does not exist.
-- Sample usage (testing):
-- select dbo.GetValueOfSplitStringByIndex('-','200-2505-0000-01-149-101-10',1)
-- select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l',0)
-- select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l',1)
-- select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l',2)
-- select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l',3)
-- select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l',4)
-- select dbo.GetValueOfSplitStringByIndex(',','abc,def,hhhhhhh,l,',0)
-- select dbo.GetValueOfSplitStringByIndex(',','abc',0)
Begin
	declare @pos int
	declare @piece varchar(500)
	declare @curr_index int
	set @curr_index = 0
	-- Need to tack a delimiter onto the end of the input string if one doesn't exist
	if right(rtrim(@s),1) <> @sep
	 set @s = rtrim(@s)  + @sep

	set @pos =  patindex('%' + @sep + '%' , @s)
	while @pos <> 0
	begin
		set @piece = left(@s, @pos - 1)
		-- You have a piece of data, so insert it, print it, do whatever you want to with it.
		if @curr_index=@index
		return cast(@piece as varchar(1540))

		set @s = stuff(@s, 1, @pos, '')
		set @pos =  patindex('%' + @sep + '%' , @s)
		set @curr_index = @curr_index + 1
	end
	return Null
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/tsql-function-to-split-a-delimited-string-and-return-a-field/2225/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER When Working with Excel Files</title>
		<link>http://www.answermysearches.com/fixing-dts_e_cannotacquireconnectionfromconnectionmanager-when-working-with-excel-files/2209/</link>
		<comments>http://www.answermysearches.com/fixing-dts_e_cannotacquireconnectionfromconnectionmanager-when-working-with-excel-files/2209/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 21:49:33 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/?p=2209</guid>
		<description><![CDATA[So I set up a SQL Agent Job to run my SSIS package following these steps.
Here&#8217;s the crazy thing.  The package would run perfectly when I ran it directly or via a batch file, but when I ran it through the SQL Agent Job it would die and I would see a message like [...]]]></description>
			<content:encoded><![CDATA[<p>So I set up a SQL Agent Job to run my SSIS package <a href="http://www.codeproject.com/KB/aspnet/Schedule__Run__SSIS__DTS.aspx">following these steps</a>.</p>
<p>Here&#8217;s the crazy thing.  The package would run perfectly when I ran it directly or via a batch file, but when I ran it through the SQL Agent Job it would die and I would see a message like this in the log file I set up:</p>
<p><code>DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Connection 1" failed with error code 0xC0209303.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.<br />
</code></p>
<p>I tried all of the work-arounds <a href="http://msdn.microsoft.com/en-us/library/cc627376.aspx">mentioned on this page</a>.  However none of them helped.</p>
<p>The answer it turns out is that 64 bit SQL Server Integration Services can&#8217;t handle Excel (xls) files!  The trick is to use the 32 bit runtime of dtexec.  To make the SQL Agent Job do this, go to the execution options tab of the job step and select &#8220;use 32 bit runtime&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/fixing-dts_e_cannotacquireconnectionfromconnectionmanager-when-working-with-excel-files/2209/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSIS &#8211; How to Export a Flat File with New Lines</title>
		<link>http://www.answermysearches.com/ssis-how-to-export-a-flat-file-with-new-lines/2195/</link>
		<comments>http://www.answermysearches.com/ssis-how-to-export-a-flat-file-with-new-lines/2195/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 21:08:18 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/?p=2195</guid>
		<description><![CDATA[I tried making a flat file in SQL Server Integration Services but SSIS decided to put all of the output on one line.  I couldn&#8217;t figure out a way to get it to make one line per record using a fixed width file type.
Finally what I ended up doing was creating a ragged right [...]]]></description>
			<content:encoded><![CDATA[<p>I tried making a flat file in SQL Server Integration Services but SSIS decided to put all of the output on one line.  I couldn&#8217;t figure out a way to get it to make one line per record using a fixed width file type.</p>
<p>Finally what I ended up doing was creating a ragged right file, and making a dummy field with 0 width as the last field.  You see, ragged right format works perfectly for exporting fixed width flat files with one record per line <strong>except </strong>that it trims the trailing spaces after that last field.</p>
<p>So making a dummy 0 width field lets you keep all of the trailing spaces in the last field you care about but still lets SSIS do its thing to add carriage returns/line breaks.</p>
<p><a href="http://www.bimonkey.com/2008/11/fun-with-ssis-and-fixed-width-flat-file-exports/">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/ssis-how-to-export-a-flat-file-with-new-lines/2195/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing SSRS Error: &#8216;/&#8217; is an unexpected token. The expected token is &#8216;=&#8217;. Line 9, position 33.</title>
		<link>http://www.answermysearches.com/fixing-ssrs-error-is-an-unexpected-token-the-expected-token-is-line-9-position-33/2193/</link>
		<comments>http://www.answermysearches.com/fixing-ssrs-error-is-an-unexpected-token-the-expected-token-is-line-9-position-33/2193/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 19:44:03 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/?p=2193</guid>
		<description><![CDATA[So I got this error when running a report in SQL Server Reporting Services that takes several minutes to run:
'/' is an unexpected token. The expected token is '='. Line 9, position 33. 
It turns out you just have to go to the web config file in C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer and change the [...]]]></description>
			<content:encoded><![CDATA[<p>So I got this error when running a report in SQL Server Reporting Services that takes several minutes to run:</p>
<p><code>'/' is an unexpected token. The expected token is '='. Line 9, position 33. </code></p>
<p>It turns out you just have to go to the web config file in C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer and change the timeout value to something high enough.</p>
<p>(Be sure to back up your web config file before editing it.)</p>
<p><a href="http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/29dfcc02-9b71-415b-bc18-86522b0d760e">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/fixing-ssrs-error-is-an-unexpected-token-the-expected-token-is-line-9-position-33/2193/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Reporting Services (SSRS) &#8211; How to Change Number of Rows Per Page</title>
		<link>http://www.answermysearches.com/sql-server-reporting-services-ssrs-how-to-change-number-of-rows-per-page/2185/</link>
		<comments>http://www.answermysearches.com/sql-server-reporting-services-ssrs-how-to-change-number-of-rows-per-page/2185/#comments</comments>
		<pubDate>Tue, 11 May 2010 13:44:50 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/?p=2185</guid>
		<description><![CDATA[One way to do this is to change the interactive size of the report to something very long or short.  For example if you want 1000 rows per page (don&#8217;t ask!) you can change the interactive size length to something like 200 inches.  
It takes some trial and error to find the right [...]]]></description>
			<content:encoded><![CDATA[<p>One way to do this is to change the interactive size of the report to something very long or short.  For example if you want 1000 rows per page (don&#8217;t ask!) you can change the interactive size length to something like 200 inches.  </p>
<p>It takes some trial and error to find the right length to use.</p>
<p><a href="http://www.sqlservercentral.com/Forums/Topic490774-147-1.aspx#bm490807">More discussion here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/sql-server-reporting-services-ssrs-how-to-change-number-of-rows-per-page/2185/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

