title: How can I loop through all the files in a folder using TSQL?
body: <p>We have a folder of excel files that we want to import into our database using TSQL. We have the code to import the individual file using <code>OpenRowSet</code>, but need to find a way to loop through the files in the folder and run this code on each file. How can this be accomplished using TSQL?</p>