<?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"
	>
<channel>
	<title>Comments on: How to Solve Problem That Excel Data Imported Into SQL Server Via DTS Became Null</title>
	<atom:link href="http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html</link>
	<description>Random thoughts and news by Andrew Chen and friends</description>
	<pubDate>Thu, 09 Feb 2012 14:05:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Gabe</title>
		<link>http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-105626</link>
		<dc:creator>Gabe</dc:creator>
		<pubDate>Thu, 16 Sep 2010 15:19:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-105626</guid>
		<description>I want to expand on what Alan Houck mentioned.

Firstly, while the default for TypeGuessRows is 8, setting this to 0 "only" examines the first 16,384 lines.  Obviously I say "only" because that's far better than 8 but it doesn't examine ALL 65536 rows of an Excel 2000 or 2003 sheet (not sure about 2007 or 2010 as I haven't used those but I know they allow more than 2^16 rows).

Secondly, I've done imports with SQL Server 2005 Import Wizard and even with TypeGuessRows set to 0, I'd still get NULL imports when a column had mixed datatypes (and there were far less than 16,384 rows of data imported).

That being said, I've had experiences where I didn't use a script with the "IMEX=1" parameter and the TypeGuessRows change helped import the data correctly (usually an error was avoided in these instances "column doesn't allow mixed datatypes").  I've also had experiences where the "IMEX=1" was used in a script and that was the only way to get data imported correctly...but in all of those instances the TypeGuessRows were set to 0 so I'd be interested to see an instance where "IMEX=1" doesn't work because TypeGuessRows = 8.

I think the best bet is, change TypeGuessRows AND use a script with IMEX=1 at all times.

HTH</description>
		<content:encoded><![CDATA[<p>I want to expand on what Alan Houck mentioned.</p>
<p>Firstly, while the default for TypeGuessRows is 8, setting this to 0 &#8220;only&#8221; examines the first 16,384 lines.  Obviously I say &#8220;only&#8221; because that&#8217;s far better than 8 but it doesn&#8217;t examine ALL 65536 rows of an Excel 2000 or 2003 sheet (not sure about 2007 or 2010 as I haven&#8217;t used those but I know they allow more than 2^16 rows).</p>
<p>Secondly, I&#8217;ve done imports with SQL Server 2005 Import Wizard and even with TypeGuessRows set to 0, I&#8217;d still get NULL imports when a column had mixed datatypes (and there were far less than 16,384 rows of data imported).</p>
<p>That being said, I&#8217;ve had experiences where I didn&#8217;t use a script with the &#8220;IMEX=1&#8243; parameter and the TypeGuessRows change helped import the data correctly (usually an error was avoided in these instances &#8220;column doesn&#8217;t allow mixed datatypes&#8221;).  I&#8217;ve also had experiences where the &#8220;IMEX=1&#8243; was used in a script and that was the only way to get data imported correctly&#8230;but in all of those instances the TypeGuessRows were set to 0 so I&#8217;d be interested to see an instance where &#8220;IMEX=1&#8243; doesn&#8217;t work because TypeGuessRows = 8.</p>
<p>I think the best bet is, change TypeGuessRows AND use a script with IMEX=1 at all times.</p>
<p>HTH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shazzbot</title>
		<link>http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-88335</link>
		<dc:creator>Shazzbot</dc:creator>
		<pubDate>Tue, 06 Apr 2010 11:31:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-88335</guid>
		<description>Thank you thank you thank you!  That worked, nothing else suggested anywhere else, ever, has worked for me.</description>
		<content:encoded><![CDATA[<p>Thank you thank you thank you!  That worked, nothing else suggested anywhere else, ever, has worked for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaya</title>
		<link>http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-71061</link>
		<dc:creator>Jaya</dc:creator>
		<pubDate>Mon, 28 Sep 2009 10:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-71061</guid>
		<description>Thanks so much for an intelligent and usable article.</description>
		<content:encoded><![CDATA[<p>Thanks so much for an intelligent and usable article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Chen</title>
		<link>http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-62556</link>
		<dc:creator>Andrew Chen</dc:creator>
		<pubDate>Thu, 11 Jun 2009 06:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-62556</guid>
		<description>I am glad that help. Thank you for commenting :cool:</description>
		<content:encoded><![CDATA[<p>I am glad that help. Thank you for commenting <img src='http://www.siusic.com/wphchen/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLMadness</title>
		<link>http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-62340</link>
		<dc:creator>SQLMadness</dc:creator>
		<pubDate>Mon, 08 Jun 2009 19:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.siusic.com/wphchen/how-to-solve-problem-that-excel-data-imported-into-sql-server-via-dts-became-null-108.html#comment-62340</guid>
		<description>I wanted to thank you for this tip. It help me sort out a problem with NULL values when importing to SQL using Jet engine.</description>
		<content:encoded><![CDATA[<p>I wanted to thank you for this tip. It help me sort out a problem with NULL values when importing to SQL using Jet engine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

