Re: "Linked Table" from a .txt file in SQL Server?
- From: Sue Hoegemeier <Sue_H@xxxxxxxxxxxxx>
- Date: Wed, 06 Apr 2005 20:08:13 -0600
Something similar would be to create a linked server to
access the text file. You use the Jet provider and set the
data source to the directory which has the text files you
want to access.
EXEC sp_addlinkedserver @server ='TextLinkServer',
@srvproduct='',
@provider ='Microsoft.Jet.OLEDB.4.0',
@datasrc='D:\',
@provstr='Text'
You could then get a list of all text files in the directory
if you execute:
EXEC sp_tables_ex 'TextLinkServer'
You can access the files as listed in the directory. Use the
table_name listed when you execute sp_tables_ex which is the
text file name.
select *
from TextLinkServer...[YourFile#txt]
to access D:\YourFile.txt
-Sue
On Wed, 6 Apr 2005 16:05:04 -0700, "Joel"
<Joel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>OKay, I'm really, really good with MS Access, but am just getting up to speed
>on SQL Server. Is there a SQL Server equivalent of linking (not importing) a
>table from a .txt file?
>
>Thanks!
.
- Follow-Ups:
- References:
- Prev by Date: "Linked Table" from a .txt file in SQL Server?
- Next by Date: LInk Tables
- Previous by thread: "Linked Table" from a .txt file in SQL Server?
- Next by thread: Re: "Linked Table" from a .txt file in SQL Server?
- Index(es):
Relevant Pages
|
|