Imports

  • Hi All

    I have a question. I'm doing imports; flat file into table, but the rows have quotation marks wrap around them, eg. "BECTSAP00"

    How can I get rid of the "" when I do the import into my table? Because the flatfile's rows have these "" marks. Please

    Also, I have to read this file from disk, say at night and load the flat file into the table. How can I automate this???

    Thanks in advance

    Anchelin

  • in ssis i believe there is a qualifier option for quotation marks

  • If you are using bcp or bulk load, choose fixed length format and use formating file, or you can bcp it in a buffer table with just one column varchar(max), then apply SQL code with substring(x,y) command to transfer to another table.

  • ...and automate it by putting the import (SSIS or BCP) into a scheduled job.

    Greg

    Greg

  • Hi All

    Thanks for your replies. However I want to do this via the Import/Export wizard. I have seleted every possible option there is, but no luck...

    Anyone please?

  • Well, you can't schedule the wizard.  You have to save as a package then schedule that.

    Greg

    Greg

  • Hi

    I've saved my packages when I ran the wizard, but I can't see it?

    Anchelin

  • Hi

    Thank you all for your replies.

    I do have another problem though, when I'm importing this file, I get the error :

    Data Conversion failed: The data conversion for column "Date" returned status 2 and status text "Value could not be converted because of potential data loss.

    The column's datatype in destination table is smalldatetime, and the date field from text file looks like the following:

    1 February 2007

    2 February 2007

    Any ideas? Will be much appreciated!!

    Anchelin

Viewing 8 posts - 1 through 7 (of 7 total)

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