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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 BCP Errors

Author  Topic 

NeilG
Aged Yak Warrior

530 Posts

Posted - 2009-10-09 : 05:23:05
Hi,

I've a query within db view to pump out data into text file which will then be moved onto another database.

however i keep getting the following error

SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unable to resolve column level collations
NULL


when i'm running the following command

EXEC master..xp_cmdshell 'bcp DBOne..Profiles out C:\FileST\Profiles.txt -c -t "¬" -S PCX -T'

I've tried searching on google etc but ahve been unsuccessful

Please help guys

I've tried changing the -c hint to -n but still not joy.



--------------------------
SQL Server MCP & MCTS

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-09 : 05:32:41
Are you able to run the view in QA successfully?
Or do you get the error here too?
SELECT * FROM DBOne..Profiles

If so, check the collation of any char/varchar columns in the query.
Especially when used in a join/union/concatenate.

Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2009-10-09 : 05:39:52
no when i run the query in QA it runs perfect with no errors, basically we have a set of text files that are created overnight and all retrieve the data from various db views. There all based on similar queries and all using the same tables, so i can't see why this is the only one that fails for this reason.

I've tried changing the -c switch to -n -N and -w and still no luck.

AGGGGHHH
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-09 : 05:53:36
Sorry - I don't know. Every collation error I had was always in the query.

I found this link: http://blogs.msdn.com/sqlserverfaq/archive/2009/06/03/bcp-command-using-code-page-65001-fails-if-both-sql-server-2000-and-sql-server-2005-tools-are-installed.aspx

Do you have both SQL 2000 and 2005 installed?

Also try with the default field terminator.
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2009-10-09 : 06:02:15
Thanks i'd seen that before, think i'll need to scout about on the query etc and see narrow down the problem
Go to Top of Page
   

- Advertisement -