﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Brandon Forest  / Solving a Problem Importing Integers Using Format Files / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 00:45:51 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>The numbers were wrong in all instances.</description><pubDate>Sun, 19 Feb 2012 23:14:16 GMT</pubDate><dc:creator>Brandon Forest</dc:creator></item><item><title>RE: Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>It isn't clear from your description what "unsatisfactory" means. Were the numbers simply wrong in some instances?</description><pubDate>Sat, 18 Feb 2012 13:11:41 GMT</pubDate><dc:creator>wmjas.shaw</dc:creator></item><item><title>RE: Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>The -n (native format) is a great way to transfer data between SQL server tables, but that's not the case in this scenario.  These are text files we receive from a Vendor.  It is simple enough to import them as Char data types into the raw extract tables and implicitly converting them to Integer between the other SQL tables, and I was doing that initially.  The business requirements changed however, and I was forced to import them as integers directly into the raw extract tables.  This article describes how to import text data directly into integer fields.Cheers!Brandon Forest</description><pubDate>Fri, 17 Feb 2012 15:54:49 GMT</pubDate><dc:creator>Brandon Forest</dc:creator></item><item><title>RE: Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>The -n option in BCP is supposed to import to it's native format.  I haven't had the kind of problem you describe, but then again my business requirements may not be as critical.  I can say that I have not had a problem importing integer data types.  I seem to have more trouble with the Imp/Exp wizard... copied from somewhere-- can't remember--nPerforms the bulk copy operation using the native (database) data types of the data. This option does not prompt for each field; it uses the native values.-cPerforms the bulk copy operation using a character data type. This option does not prompt for each field; it uses char as the storage type, no prefixes, \t (tab character) as the field separator, and  (newline character) as the row terminator.-NPerforms the bulk copy operation using the native (database) data types of the data for noncharacter data, and Unicode characters for character data. This option offers a higher performance alternative to the -w option, and is intended for transferring data from one SQL Server to another using a data file. It does not prompt for each field. Use this option when you are transferring data that contains ANSI extended characters and you want to take advantage of the performance of native mode. -N cannot be used with SQL Server 6.5 or earlier.</description><pubDate>Fri, 17 Feb 2012 13:09:41 GMT</pubDate><dc:creator>Caruncles</dc:creator></item><item><title>RE: Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>BCP has the -C option, it converts the non characters datatypes to character datatypes</description><pubDate>Thu, 16 Feb 2012 07:03:33 GMT</pubDate><dc:creator>csolervicens</dc:creator></item><item><title>RE: Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>Good to know all this time i was doing the same conversion you mentioned.extra work reduced :)</description><pubDate>Thu, 16 Feb 2012 06:29:56 GMT</pubDate><dc:creator>Ash DBA</dc:creator></item><item><title>RE: Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>BCP has the -C option, it converts the non characters datatypes to character datatypes</description><pubDate>Thu, 16 Feb 2012 04:29:39 GMT</pubDate><dc:creator>csolervicens</dc:creator></item><item><title>Solving a Problem Importing Integers Using Format Files</title><link>http://www.sqlservercentral.com/Forums/Topic1252869-1398-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/BCP/86935/"&gt;Solving a Problem Importing Integers Using Format Files&lt;/A&gt;[/B]</description><pubDate>Wed, 15 Feb 2012 22:27:43 GMT</pubDate><dc:creator>Brandon Forest</dc:creator></item></channel></rss>