Import Data From Excel as varchar

  • Hi,

    Am attempting to import a spreadsheet of data as a new table.

    I specify the field as varchar(10).

    I have made sure that the spreadsheet has the column stored as text.

    However the Import Data wizard within SQL workbench or whatever the 2005 replacement is called for Enterprise manager, skips data that doesn't match a numeric value

    Eg

    My data looks like (coded values)

    1A

    2

    3

    0

    1A

    SSIS inserts nulls instead of the '1A' value.

    Why Why Why?

    Enterprise Manager and DTS was so easy!!!!!!!!!!!!!!!!!!!!!!!

  • Welcome to one of the most irritating nuances of SSIS. Text is seen as NVarchar and not Varchar. In other words, if you have a text (10), make it Nvarchar (20).

    You can use a dataconversion transformation to get past this.

    ~PD

  • My bad... I meant in Excel, text is seen as nvarchar and not varchar

  • Ill try nvarchar next time..

    I imported it into MS Access first and then into SQl Server.

  • SSIS and MS Access also has its own unique nuances, some of which are downright irritating.

    Good luck!

    ~PD

Viewing 5 posts - 1 through 4 (of 4 total)

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