In Management studio how to import csv into existing table and making datatypes match

613 Views Asked by At

I have an already set up table in management studio where all of the datatypes are varchar(50) while a few are varchar(80), I want the ability to delete all the rows in the table and import new data(csv) in using the import wizard, but for some reason it doesnt import because of a truncating error even though the data i am importing is smaller than the datatypes which are in the table

1

There are 1 best solutions below

1
On

While copying the data from cav into it is not only necessary to have same datatypes.U should specify same size as of ur data.Like if u have string with 100 characters then u should specify the size of varchar (100) for that column