I have many excel generated csv files which I want to import in to ms sql using bulk insert as a stored procedure. I can do individual files using this.
BULK INSERT HorseRacingMasterTable
FIRSTROW = 2,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
But what I want to do and can't is use a variable for the file name. I.e. in the above example the file name 659620.csv would be replaced with a variable that would be passed to the stored procedure from a vb front end. All and any help much appreciated thank you.