显示标签为“ext”的博文。显示所有博文
显示标签为“ext”的博文。显示所有博文

2012年3月29日星期四

bcp_moretext & NULLs

When sending two 'text' columns using BCP, and using bcp_moretext because
the first is very large, and if the second is NULL, then how do you send a
NULL value using bcp_moretext?Peter (schmidt.peter@.comcast.net) writes:
> When sending two 'text' columns using BCP, and using bcp_moretext because
> the first is very large, and if the second is NULL, then how do you send a
> NULL value using bcp_moretext?

I have never used bcp_moretext, but what happens it you set the length to 0
with bcp_collen?

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

bcp: starting copy...

hello - i have this problem:
i am able to use bulk insert script like
"bulk insert demodb..table1
from 'c:\filename.ext' with (formatfile = 'c:\bcp.fmt')"
to import a binary file into sql server.
table1 has 4 columns, noted column is number 2, type image, here's my format file:
8.0
1
1 SQLIMAGE 0 100184 "" 2 logo ""
i import only the binary file.
however when trying to do the same using bcp with the same format file, it just says
"starting copy..." and goes to sleep !
any idea what i should do?
i created a temp table with just an IMAGE column and then the bcp method works, but i rather need it with my current setup - table with 4 columns

thank youAny error or information on SQL error log for this behaviour.

Can take help of PROFILER to see the activity during this execution.