Format File

  • How are these data type displayed in a format file ?

    Numeric(9,10)

    Decimal(13,2)

    Float

    Money

  • Since format files specify the data type of the text file you are working with, it's common to always use SQLCHAR as the datatype, and specify a collation if the database field you're mapping this to is VARCHAR or NVARCHAR. If you're having problems creating a format file, the BCP command line utility can easily create one for you from an existing table.

  • As already suggested, use the bcp command line utility to generate a format file for you. I recommend using the xml format file is possible.

    Command:

    C:\>bcp DatabaseName..TableName format nul -T -c -x -f FormatFileName.xml

    Example of numeric column in xml format file:

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

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