I am working on SQL Server 2008 R2.
I need to BULK INSERT only a certain .CSV file.
Here is my script :
BULK INSERT HPCM_HRSS.dbo.HRSS_TEST
FROM '\\FOLDER\HRSS TEST\BISM043_Oracle FRG Workforce 201410.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n',
FIRSTROW = 2
)
GO
There is only 1 file with this naming and I archive this file after the import. The file name changes from 'BISM043_Oracle FRG Workforce 201410.csv' to 'BISM043_Oracle FRG Workforce 201411.csv'
How do I change the script in order to import any file with the naming 'BISM043_Oracle FRG Workforce' in that specific folder?
Any advise would be greatly appreciated.