Home Forums SQL Server 2005 SQL Server Express How to import Multiple csv files from Multiple Folders into single sql server table RE: How to import Multiple csv files from Multiple Folders into single sql server table

  • I presented an idea and example to get you part of the solution. I thought it would get you started...you really didn't provide anything concrete as far as true requirements.

    it should be pretty obvious that you could create a cursor to find all the sub folders in the master folder, so whether there is 2 sub folders or 200, it' the same way it's getting the data as the list of files;

    something like dir *.* to get the list of folders, then iterate thru each folder for each file beneath the folder.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!