Importing text file to SQL Server using BCP utility

Unanswered Importing text file to SQL Server using BCP utility

  • Sunday, January 27, 2013 9:19 PM
     
     

    Hi,

    I am trying to import a large text file to sql server using the bcp utility and a format file.

    However i am getting the error message "invalid buffer size for bcp column property". I have searched widely but cannot appear to locate the source of this issue. Any help would be greatly appreciated.

    Many thanks

    Scott

All Replies

  • Monday, January 28, 2013 7:08 AM
     
     

    Hi Scott,

    Can you please post the command line you are using?


    - Vishal

    SqlAndMe.com

  • Monday, January 28, 2013 7:43 PM
     
     

    Hi Vishal,

    The command line i'm using is as follows

    bcp (database name).dbo.(tablename) in "c:\users\scott\desktop\fiilename" -T -K -m1 -S (server name) -f c:\users\scott\formatfilename.fmt -L3

    The text file uses a pipe symbol and quotation marks as delimiters but i'm only using the pipe symbol in the format file and will take out the quotation marks upon import.

    thanks

    Scott

  • Tuesday, February 05, 2013 8:37 PM
     
     

    If anyone would like more detail on this problem in order to suggest an answer, please let me know

    Thanks

    Scott

  • Wednesday, February 06, 2013 6:50 AM
     
     

    Hi Scott,

    I tried the command and found no issues.

    The command you are using has no issues, please check your format file for any issues.


    - Vishal

    SqlAndMe.com