Hi
I created a set of SQL stored procedure to load all CSV in a folder into a table
Unfortunately I found out the customer has no permanent PC to install SQL Express (all portables)
So I decided to use an Azure Sql Database.
So far I was able to import a CSV using BULK INSERT and from EXTERNAL DATA SOURCE
My problem is that I dont know in advance the names of the csv file the user will put into the Azure Storage
I need a way to list all files so I can iterate each file with a cursor and BULK INSERT THEM
I search an was not able to find a way to list files in a Storage from T-SQL (please do not propose SSIS or Azure Studio)
My solution must be 100% Stored Procedure
The only thing left to have my solution working is to get the list of files in the Storage.
I can issue command SELECT * FROM sys.external_data_sources and it shows my folder
I need the same to show the actual files in this folder/data_source
Thank you