2012年3月8日星期四

bcp Format files help?

I am using bcp to execute a query and would like to use the -f option for format_file so I am going thourgh the books on line and trying to make some sense out of it,no quite clear on it at the moment.

How do I find out the version of bcp utility and would somebody have an example with this options just to see how it works.

ThanksFormat files? Jeez, it's been a while...

As I recall there is an option you can include that will create a format file for you. Run the BCP once with this option and then edit the file it creates. That's the LAZY DBA way...|||You can "cook your own" sample using something like:bcp master.dbo.sysdatabases format sd.dat -Usa -c -SC1126582-B -fsd.fmtThis will create a format file that is properly formatted for the source table, using conventional character output.

A lazy dba is a good dba!

-PatP|||What the hell is -B?|||What the hell is -B?Part of the workstation name, not a parameter!

-PatP

没有评论:

发表评论