SQL Server combined with Index Server application 3/3

Source: Internet
Author: User
Tags web database
This article extracts from the Railway publishing house new "use BackOffice to establish Intranet/extranet Application" book (now available in the bookstore. such as Haidian book City, Xidan book building and so on. In the field or need door-to-door readers can go to www.wanbook.com.cn or www.e-bookshop.com.cn online purchase. The book number is ISBN7113039448). This book details how to use the Microsoft BackOffice family of products to build intranet/extranet applications. With it you will master the installation and setup of NT, use IIS to set up a Web site, set up a network conferencing system through ILS, create an enterprise mail and collaboration system with Exchange, build Web database applications with SQL Server, and use proxy Server establishes secure connections to the Internet, creates network TV/radio stations with Media server, builds powerful chat rooms with Chart server, builds personalized mailing lists with Site server, and analyzes access to Web sites, Use Commerce Server to establish business-to-business or business-to-consumer e-commerce sites. In addition, the book also discusses the security of the network, which guides you through a more robust and secure network application. After reading this book, you will find that the implementation of the rich and colorful network applications is so simple ...
Absolutely original, welcome to reprint. But make sure you keep the above text.
6.11.2. Query index Server via SQL Server
If you want to query the index Server through SQL Server, you must use the OPENQUERY function. Its grammatical structure is as follows.
OPENQUERY (linked_server, ' query ')
Where the linked_server parameter is the name of the connection. The query parameter, however, is sent to the OPENQUERY function as a string. This function returns a virtual table so that we can make further inquiries about it.
The following statement finds all files that contain the word SQL in:
SELECT *
From OpenQuery (filesystem,
' SELECT Directory, FileName, DocAuthor, Size, Create
From SCOPE ()
WHERE CONTAINS (Contents, ' SQL ')
The syntax of the FROM statement for a query to index server differs from the normal SQL statement. Its grammatical structure is as follows:
from [Catalog_name.] {SCOPE ([' scope_arguments '])}
The Catalog_name parameter is used to indicate the index directory where the query is to be queried. Because we can only select one index directory when we define a connection, this parameter is omitted here. The scope function is used to indicate the directory where the file you want to query is located. The syntax structure of the scope function is shown in the following illustration.
Graph 6.11.2-1scope function Syntax structure diagram
Where the deep traversal of keyword indicates that all files in the directory will be queried, including all files in their subdirectories. The shallow traversal of keyword, however, indicates that only files in the top-level directory are queried, not those in subdirectories. If you do not indicate the directory depth of the query, the default is deep traversal of.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.