Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sqlslick
Yak Posting Veteran
83 Posts |
Posted - 2012-03-27 : 15:35:06
|
| Hi guys,I need to make sure the file 'Test.txt' exists in the network location '\\myshare\abc$\DATA\' before proceeding with the BULK INSERT statement that will load the contents of the file to a table in the database MYDB.Based on what I have researched so far the xp_fileexist Stored Procedure is not recommended be used as it is an undocumented SP. I've also tried using xp_cmdshell but I am having a permission issue.Any feedback will be greatly appreciated.Thank you!J |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-03-27 : 15:38:12
|
| I do use xp_fileexist. And yeah, I know it's undocumented. MS uses it in some XPs so I'm not too worried about it going away. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-03-27 : 16:27:35
|
| Who said what? |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|