Search code examples
sql-servercsvssissql-server-2014data-conversion

Import Varbinary(max) data using SQL Server/SSIS Data Import Wizard?


Is it even possible to import .csv flat file data into a SQL Server 2014 table using only the SSMS or SSIS Import/Export Wizards, if the table contains a varbinary(max) column?

I have searched hours and hours, and tried numerous configurations and different data types (e.g. DT_IMAGE) in both the SSMS and SSIS Import/Export Wizards to perform a simple, quick-n-dirty import of .csv file data into a four column table containing a varbinary(max) column in SQL Server.

I realize there are various other means to accomplish this by writing Trans SQL, using bulk-copy, adding column-import tasks, etc., but I find it hard to believe that I can't use the simple point-n-click configuration of the Import/Export Wizard, simply because the data happens to contain a varbinary(max) field, so I assume I must be doing something wrong.

Below are screen shots from the SSMS Import/Export Wizard...I get the same error in both SSMS and SSIS:

SSMS Import/Export Wizard Columns

SSMS Import/Export Wizard Error Messages


Solution

  • You can use DT_TEXT An ANSI/MBCS character string with a maximum length of 2^31-1 (2,147,483,647) characters. Integration Service Data types. It Will be varbinary(max) in database.

    enter image description here

    I have used the sample data provide by you and imported it in the database. enter image description here