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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Reading a text file from a remote location

Author  Topic 

ayamas
Aged Yak Warrior

552 Posts

Posted - 2008-10-08 : 03:15:54
Hi guys,
I want to read a text file from a remote location.

SQl server – 10.10.01.02

Remote machine – 10.10.01.111

SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

'Excel 8.0;Database=C:\glarlogs\OCT.csv', 'SELECT * FROM [Details$]')

--this is working



SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

'Excel 8.0;Database=\\10.10.01.111\C:\OCT.csv', 'SELECT * FROM [Details$]')

--If I want to read file from remote location..how should I do.

Regards.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-08 : 04:08:08
try this:-

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
Go to Top of Page
   

- Advertisement -