stored procedure to import multiple CSV file in to SQL server express 2005
In my project i have folder containing multiple CSV files need to import them in to SQL server express 2005. Using Bulk Insert command we can import one file in to table not multiple file. Need to wrire a stored procedure to import all files in to sql server 2005.
Are the file names consistent? Could you not just have multiple bulk insert commands? There isn't anything stopping you from doing a bulk insert of file1.csv, then bulk insert file2.csv and both insert into the same table. Any particular reason for doing this with a sproc instead of using SSIS? SSIS was built for this type of process. If the file names are not consistent and you can't use SSIS then I would start looking at powershell.