Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Australia
    Posts
    183

    Unanswered: 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.

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Format 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....
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    You can "cook your own" sample using something like:
    Code:
    bcp master.dbo.sysdatabases format sd.dat -Usa -c -SC1126582-B -fsd.fmt
    This 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

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    What the hell is -B?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by Brett Kaiser
    What the hell is -B?
    Part of the workstation name, not a parameter!

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •