Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bcp collation problem?

Status
Not open for further replies.

Glasgow

IS-IT--Management
Jul 30, 2001
1,669
GB
I export data from a table to an output file using BCP. That data is later imported into other databases using BULK INSERT. This all worked fine under SQL 2000.

The table has one large field defined as varchar. That field contains delimiters that are ASCII 254 & ASCII 255. When I BCP the data in SQL 2005, the ASCII 255 characters are retained but ASCII 254 characters are translated as lower case 't'.

Is anyone able to shed any light as to why this behaviour might have changed under SQL 2005? Do I need to specifiy collation or revert to format files?
 
I confess I made a huge meal of doing so but but I appear to have resolved the problem. I now specifically reference Code Page 850 when exporting (BCP) the data and re-importing (BULK INSERT) but I'd still be interested to know why this worked in SQL 2000.
 
It could be collation issues, are both database the same collation. In each DB run

SELECT DATABASEPROPERTYEX(db_name(),'COLLATION')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top