This command can be used to dynamically create the path for a file based on the current instance. It assumes each instance server has a directory called BulkInsert which we use to store the csv files we want to import.
1: select '\\' + substring(@@servername, 1, charindex('\', @@servername)) + 'BulkInsert\filename.csv'
No comments:
Post a Comment