Hi all, I'm testing, with SQL 2014 on the same DB, a procedure that extracts data from a table into a file and Loads data from that file into a different table which has the same columns as the initial table (I use a function to create the create table statement from the source table and change the name of the destination table)when doing my bcp -c the record with the special character "é" doesn't make it to the file. when doing a bcp -w the record with the special character makes it to the file but the bulk insert omits the whole record. The result file in the case that makes it to the file is unicode. I'm not using a format file (don't see the need for it)The bulk insert into the destination table that contains identical columns as the source (a mixture on int, varchar, char) --> didn't workI also tried by building the columns of the destination table with nvarchars -- Still doesn't work. I tried the bulk insert with: codepage = 'ACP, 'RAW' --> didn't change anything. still didn't work.it's a complicated process that takes 1 XML record that contains information + the Create Table Statement (to eventually be able to this on a different server/DB) + the title Row for each column + the Data... Each of these are created with a BCP command (all with the same options). they are then appended to each other with a copy /B c:\file1.txt + c:\File2.txt + c:\File3.txt + c:\File4.csv c:\ResultFileonce the result file is created I bulk insert the 2 first rows in one table "TableA"create the tmp table "TABLE B" with the create table statement that is in "TableA"and do another bulk insert of the remainder of the file into the newly created table.What else can I try?Should I be creating a format file? what are the benefits of a format file?It's a very long procedure that does both Extract and Load (with 12 parameters) not sure what I should put here.
↧