2012年2月23日星期四

bcp and ntext SQL 2K

Is it possible to export ntext data to a text file using bcp and preserve all of the text?

Thanks from first time bcp-er.

Yes, bcp will retain your text, at least in 7.0 and 2k. I haven't tried it in 2k5 yet.

|||

Thanks Anget,

What do I do to retain the ntext formatting? If I accept the defaults in the bcp.fmt file, I lose some of the data.

Best Regards,


Elaine

|||Try to use parameter -N to tell bcp to bulk export "Native Data"
ex.

Code Snippet

bcp myTestUniNativeData out C:\myTestUniNativeData-N.Dat -N

|||

Thanks Alex, that gets the whole field as it appears in the original

Thanks Angel, too for your help.

Best Regards,

Elaine

没有评论:

发表评论