Question: how to automatically import data into sql server?
Answer: If you want it to be truly automatic, you will need to go beyond SQL. Otherwise, scheduling a load from the csv to your database would require a simple SSIS package. Then you can go and schedule a job using SQL Server Agent to import the data daily, weekly, hourly, etc. $filenames = glob($_SERVER['DOCUMENT_ROOT'] .