-
CSV Linked Server
Very nice articles about linked servers. I need to use a csv file as a datasource for a linked server. I can not figure out the prompts for the dialogue to create a new linked server in Enterprise Manager.
Could someone please help me out?
Thanks
Terry Hill
Flex
-
Copy your CSV files and text files to a folder c:\XYZ
--Add Linked server
EXEC sp_addlinkedserver MyCSV, 'Jet 4.0', 'Microsoft.Jet.OLEDB.4.0','c:\XYZ', NULL,'Text'
--Authenticate
EXEC sp_addlinkedsrvlogin MyCSV, FALSE, NULL,NULL,NULL
--List all files
EXEC sp_tables_ex MyCSV
--List details of one file.
select * from openquery(MyCSV,'select * from mycsv.csv')
-
That worked great! Please accept my sincere thanks.
Terry Hill
Flex
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|