Importing multiple .dbf files with TSQL

  • Hey Everyone!

    First time poster here, so bear with me. :w00t:

    I have been given a project to read in multiple .dbfs in multiple directories into a SQL Server 2000 database. I was hoping I could use the SELECT INTO clause to import these in. I can dynamically iterate and manipulate the file names as needed, it is just the select into that I am having a problem with. Is it even possible through TSQL?

    Many thanks,


  • SELECT INTO expects to create the destination table. If you are trying to load them into an existing table, you need to do INSERT INTO Table (list of destination column names) SELECT list of source column names IE INSERT INTO dbo.TestTable (SamplePop, DateSampled) SELECT PersonNum, GETDATE()


  • Ooops... I should have been clearer. I am looking to create the table at the same time from the .dbf's. Thanks,


  • hi, you can use throu SSIS. if any help in SSIS ,pls let me know.

  • I am afraid I do not have 2005 or for that matter even know what SSIS is at this time. Yes, I dropped into the wrong forums.


  • dont worry.. u can do it in DTS in sql2000.i done similar thing..




  • Hi

    cant u use opendatasource or openrowset for this.

    "Keep Trying"

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

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