csv to a table in sql server 2000

  • I whant to know how can i transform information that i have in a lot of csv to a table in sql server 2000.

  • BULK INSERT, bcp and DTS can all do this for you.  Sounds like DTS might be your best bet if you have more than one file since you can use dynamic properties to help you to automate your import.

    John

  • thanks you john but i be greateful if someone give me an example

  • You should read in Books Online about BULK INSERT, bcp and DTS, then post again if there's anything you don't understand.  We can't give you an example unless you describe exactly what it is you want to do.

    John

  • A good example of this can be found at:

    http://www.sqldts.com/246.aspx

     

  • I have found that easiest way to create complicated DTS packages is to use the built in Wizard.

    1.  Right click the database you would like to import the CSV files to

    2.  Select 'All Tasks'

    3.  Select 'Import'

    The Data Transformation Services wizard will pop up

    4.  Follow the prompts manipulating the import data as you go

    5.  Save as DTS package

    6.  Open the DTS package and add any other functions or manipulations as needed

    The best thing about this wizard is that it will show the first few lines of the import file so that you can manipulate the data columns as you go.  When the wizard completes, it will give you options to save as DTS package and/or to run now.  If this is something you will be importing often or the project will require further manipulation, save it as a dts package.  Once the base DTS package is completed via the wizard, you can open it and add more processes.


    Kindest Regards,

    Ginger

    Delete * Where flatfile=true

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

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