sql server 2005 import/export wizard

  • I'm trying to import a flat file into a sql server 2005 database. I have used this flat file to load into sql server 2000 database previously with no problem. Basically my problem now is that the table that I'm loading

    to has columns that are all integers. The flat file is all strings. In sql server 2000 if the flat file column was defined as a string and it contained spaces it would be converted into the perspective table column as a null. Now with the advent of SQL SERVER 2005, you receive

    a type cast error. I've even tried changing in the import wizard the flat file column datatype to an integer. Then it will run successfully, however, it will supply the column with a zero when the flat file column is

    really spaces. Any assistence would be greatly appreciated.

  • it seems that you can string values in that specifc column. To verify this can you import those data to varchar field and verify.

    It may be that you have spaces in the text file which is falling when inserting values to the table.

    if you can use SSIS package, by adding a data viewer you can see what are the data coming into the database




    My Blog: http://dineshasanka.spaces.live.com/

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

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