목차 숨기기

Retrieving SQL Values from a Linked Server Source

By configuring a linked server in SQL server, you can retrieve data from many external data sources such as MS Access, Excel, or other database types.

To populate Enterprise PDM lists with data contained in an Excel workbook, you would have to first configure an Excel data source as a linked server in SQL Server, then query the linked server for desired information.

For more information on linked servers and distributed queries, please consult the following Microsoft Knowledge Base article: http://support.microsoft.com/kb/306397

Excel must be installed on the server that has the SQL server installed.

To configure an Excel data source as a linked server in SQL Server 2005:

  1. In SQL Server Management Studio, in the Object Explorer pane, expand Server Objects.
  2. Right-click Linked Server and select New Linked Server.
  3. To create a new linked server, in the left pane, in the General property page:
    1. Type any name for the linked server. You should choose a name similar to the name of the Excel worksheet for easier reference. In this example the name "MY_EXCEL_WORKBOOK_LINKED_SERVER" is used.
    2. Select Other data source.
    3. In the Provider list, click Microsoft Jet 4.0 OLE DB Provider.
    4. For Product Name, type Excel for the name of the OLE DB data source.
    5. For Data Source, type the full path and file name of the Excel document, for example: C:\EngineeringData\My_Excel_Workbook.xls.
    6. For Provider String, type Excel 8.0 for an Excel 97, 2000, or 2002 workbook.
    7. Click OK.
  4. Query the Excel data source on the linked server.

    For example, to retrieve the fields in the 'PartNumber' column stored in Sheet1 of your Excel file you can use the following code: SELECT PartNumber FROM MY_EXCEL_WORKBOOK_LINKED_SERVER...Sheet1$

You can use the above SQL Query in an Enterprise PDM list with a data type "From SQL Database" and set it to refresh every X minutes to retrieve the PartNumbers from the Excel file into Enterprise PDM.

You must enter a database name (any existing database on the server will do, for example the Northwind sample database or the file vault database), and the server and login credentials of the SQL server with the linked server.



이 도움말에 대한 피드백 제공

SOLIDWORKS는 도움말 정보의 개선을 위한 고객님의 제안 사항과 의견을 환영합니다. 제안하고자 하는 의견을 아래 양식에 작성하여 도움말 문서 팀에 직접 전달할 수 있습니다. 문서 팀은 제품에 관한 기술적인 지원은 하지 않습니다. 기술 지원에 관한 정보는 여기를 클릭하십시오.

* 필수 입력

 
*전자 메일:  
제목:   도움말에 대한 피드백
페이지:   Retrieving SQL Values from a Linked Server Source
*사용자 의견:  
*   개인정보 보호정책을 읽었으며 본 정책에 따라 Dassault Systèmes에서 내 개인 정보를 사용하는 것에

인쇄 항목

인쇄할 콘텐츠 범위 선택:

x

Internet Explorer 7 이전 버전을 사용하고 있습니다. 페이지를 최적화하려면 사용 브라우저를 Internet Explorer 7 이상으로 업그레이드합니다.

 이 메시지를 다시 표시하지 않음
x

웹 도움말 콘텐츠 버전: SOLIDWORKS PDM 2014 SP05

SOLIDWORKS에서 웹 도움말 기능을 비활성화하고 로컬 도움말을 사용하려면, 도움말 > SOLIDWORKS 웹 도움말 사용을 클릭합니다.

웹 도움말 인터페이스나 검색 기능에서 발생한 오류 사항을 보고하려면, 로컬 지원 서비스 담당자에게 문의하십시오. 개별 도움말 항목에 대한 피드백을 제공하려면, 각 도움말 페이지의 "이 단원에 대한 피드백 제공" 링크를 사용하십시오.