March 26, 2008 at 7:58 am
I would say that either the tables (PolicyProcessAudit2 and PolicyProcessAudit have different structures - one of columns in the first table is longer than column length in the other table, or the field "null as AuditXml" is causing problems. You may try to use: CAST(null as PutProperDataTypeHere) as AuditXml.
The simplest test is to select just 1 record from the first table and insert it into second table (with INSERT ... SELECT statement).
You may also try using "-c" parameter (instead of "-n").
Marek
March 26, 2008 at 8:32 am
The table structures do match (except for indicies)....but I will try -c instead of -n
May 21, 2008 at 3:01 pm
did you end up getting this to work? I am having a very similar issue!
May 21, 2008 at 6:09 pm
On the truncation problem, everyone realizes that the table columns must be in the same cardinal order as the input file unless you use a format file, right?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 22, 2008 at 1:24 am
What I don't like in Michael's query is this: "null as AuditXml". I would say that in this case SQL Server does not know what type is this field. I would rather cast NULL value to a specific type.
Sara, just try to export only 1 row of data with -c option and check the export file. It can happen that some fields contain TAB, CR or LF characters, which confuse the server. If this is the case, you may need to specify different field/row termination characters.
Marek
May 23, 2008 at 9:57 am
Actually, it turned out using -c solved my problem. For whatever reason, the -n did not work!
thanks for your help guys.
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply