bcp

  • Hello,

    I need help creating a format file using bcp.

    All resources I have read on MS web is not clear.

    Thank you

  • what are you having trouble with?

    format files are not always needed, so we need a bit more information.

    if you have an existing table structure, you can create a format file with bcp automatically for you;

    http://msdn.microsoft.com/en-us/library/ms191516.aspx

    one of the examples there, is from a command line you could run this command:

    bcp AdventureWorks2012.HumanResources.Department format nul -T -n -f Department-n.fmt

    if you have an exisitng file, but not the format file, it's a little harder, since you need a model of a format file,a nd have to edit it to match your data.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thank you for your help.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply