Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Prasad writes "Please let me know the procedure of reading a text file from a stored procedure. Do I need to use any extended stored procedures ? I do not want the text file contents to be stored in any tables.Thanks in advance,Prasad P"
madhivanan
Premature Yak Congratulator
22864 Posts
Posted - 2005-08-25 : 09:39:33
You can use OpenRowSet or use Linked serverThe following will add text files as Liked Server
Note that C:\testing is the parent folder where your text file is locatedThen write this queryselect * from txtsrv...[test#txt] -- Replace test by the name of the text fileMadhivananFailing to plan is Planning to fail