field delimiters in bcp

  • Hi,

    I'm trying to copy data from table to textfile using bcp

    bcp is inserting spaces as field delimiters, I don't need any delimiters , I'm looking for for fixed width columns data to be transferred.

    here is the command i'm using

    exec master..xp_cmdshell 'bcp db.dbo.table OUT  D:\ak  -S server -U id -

    P pwd -c -r\n -t'.

    data in cols

    col1 :abc

    col2:xyz

    File should contain: abcxyz

    Thanks

     

     

  • use queryout, and in the query select col1+col2 from table.

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

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