Results 1 to 3 of 3

Thread: CSV Linked Server

  1. #1
    Join Date
    Mar 2005
    Posts
    2

    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

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    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')

  3. #3
    Join Date
    Mar 2005
    Posts
    2
    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
  •