data export

  • Hi all,

    What is the best (fastest) way to export data into a flat file if one of the columns is varbinary(max)?

    I am trying the following:

    DECLARE @table VARCHAR(128),

    @file VARCHAR(255),

    @cmd VARCHAR(512)

    SET @file = 'C:\temp\' + @db_in + '.' + @schema_in + '.' + @table_in + '.dat'

    SET @cmd = 'bcp ' + @db_in + '.' + @schema_in + '.' + @table_in + ' out ' + @file + ' -n -T '

    EXEC master..xp_cmdshell @cmd

    END

    but it is taking some time and I am suspecting BLOB column being the offender.

    Is there another way?

    Thanks,

  • This was removed by the editor as SPAM

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

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