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,