cmcc (11/1/2012)
🙁Didn't work.
Getting this
...is too long. Maximum length is 128.
I use a view for the data, which is short enough.
It's getting the column names output that is causing me problems.
I'd use SSIS but I don't have time - I've been fiddling with this problem in SSIS for six weeks now, off and on, and keep tripping over one SSIS issue after another.
At least the BCP error makes sense to me.
In SSIS I have to change the file names - they have to be the date the package is run or the date from a parameter I have to pass in. This is a piece of cake from a parameter in a stored procedure but is taking a while to work through in SSIS.
i.e. I haven't gotten it to work yet.
ARGH!!!!
Post your BCP command for this because, as you can see, my command is larger than 128. What may be wrong is a very large column name that QUOTENAME is tripping over. There's a fairly easy fix for that but it would help to see the actually BCP command you're using.
Also... do any of the columns in the BCP command have a datatype larger than VARCHAR(128) or NVARCHAR(64)???
--Jeff Moden
Change is inevitable... Change for the better is not.