Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Argentina
    Posts
    58

    Unanswered: automatically import csv to MsSQL

    Hi is there a way to emulate the MSSQL import wizard with a command prompt so I can shedule an automatic import form a csv file?

    Thansk!

  2. #2
    Join Date
    Sep 2005
    Posts
    161
    Look up BCP (bcp in) and bulk insert in BOL. There are several command line parameters that can be used. Sometimes you can get by with filename and table table.

    Bill

  3. #3
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    If you're using the import wizard, just save it as a DTS package (option available at the end). You can then schedule the DTS package to run whenever you want. Look at www.sqldts.com for information on DTS.
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  4. #4
    Join Date
    Feb 2004
    Location
    Argentina
    Posts
    58

    Thumbs up great

    Thanks! I didn't notice you could save the DTS.

    I'll try that, since the file and table will be fixed, I'm sure it will work!

    Thansk again.

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Better look closely at the options you select.
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •