Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JCKSQL
Starting Member
3 Posts |
Posted - 2005-01-27 : 12:05:13
|
| Hello,I am trying to do a BCP from one table to another, the tables are the same except the last column on the "Copy To" table is not in the "Copy From" table (the column is nullable). When I try to do the BCP load I recieve the error: "Invalid character value for cast specification". If I remove the new column, or tack on 3 chars (the size of the new column) to my BCP get statement (a stored proc for that table) the BCP works correctly. However, I was under the assumption that BCP would allowing inserting NULL in a field which is Nullable, is this correct? If not, is there another way (maybe through a format file or something) I can get around this problem with out changing the table or my stored procedure that "gets" the data. Thanks. |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-01-27 : 13:07:16
|
| Yes, you need to use a format file, based on the destination table..and make sure to put a 0 in for the column that is not getting any data...Brett8-) |
 |
|
|
|
|
|