﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / BCP native format  data issue on import / 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>Sat, 25 May 2013 00:08:48 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: BCP native format  data issue on import</title><link>http://www.sqlservercentral.com/Forums/Topic1411717-146-1.aspx</link><description>thanks Lowell..it checks out</description><pubDate>Mon, 28 Jan 2013 09:33:53 GMT</pubDate><dc:creator>robinrai3</dc:creator></item><item><title>RE: BCP native format  data issue on import</title><link>http://www.sqlservercentral.com/Forums/Topic1411717-146-1.aspx</link><description>run bcp /? from the command prompt for all the possible flags;i think the one you want is the -E flag:[quote]-E keep identity values[/quote]</description><pubDate>Mon, 28 Jan 2013 09:05:21 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>RE: BCP native format  data issue on import</title><link>http://www.sqlservercentral.com/Forums/Topic1411717-146-1.aspx</link><description>Hi All,I've checked the target tables again and apologise but they do have identity fields...and that is what is causing the problem..the "bcp in" just generates sequential keys for the id column ignoring the source data for the id. I thought in native format the data being binary the bcp would ram home the data for this column.  Any one know of setting the CHECK_IDENT_INSERT on type of flag  (if there is one) for bcp ...rgdsrobin</description><pubDate>Mon, 28 Jan 2013 09:00:36 GMT</pubDate><dc:creator>robinrai3</dc:creator></item><item><title>BCP native format  data issue on import</title><link>http://www.sqlservercentral.com/Forums/Topic1411717-146-1.aspx</link><description>I am using bcp in native format to export a products table outwhich has an integer primary key (NOTE it is not an IDENTITY) but with gaps in the id.i.e i have 5878 rows and the product id at row 5878 stands at 6008however when importing the data back on a different sql server... the product id is beingreset totally sequentially getting rid of the gaps in the id that were presentin the key so the max product id at row 5878 is now 5878...and all product id's now match all the row numbersthe total rowcount is 5878 in both cases...I cannot understand it as i am doing a native export and importwhich is the defacto way of transferring sql server to sql serveri've checked it out a few times and it is still doing itsql as belowselect max(productsid) from products_target          5878select max(productsid) from products_source          6008select count(*) from products_target                 5878select  count(*) from products_source                5878any ideas ?</description><pubDate>Fri, 25 Jan 2013 07:27:45 GMT</pubDate><dc:creator>robinrai3</dc:creator></item></channel></rss>