Export (0) Print
Expand All

Batched Statements

Note  Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

Batched statements allow you to set and execute SQL statements, optionally separated by semicolons ( ; ), as one command. You can batch SET statements with CREATE VIEW statements and, optionally, with a single following SELECT statement.

SET_Statement | CREATE_VIEW_Statement
[ [;]  SET_Statement | CREATE_VIEW_Statement ] ...
[ SELECT_Statement ]

Parameters

SET_Statement

For details about SET_Statement, see SET Statement.

CREATE_VIEW_Statement

For details about CREATE_VIEW_Statement, see CREATE VIEW Statement.

SELECT_Statement

For details about SELECT_Statement, see SELECT Statement.

Remarks

The duration of batched SET and CREATE VIEW statements is the length of the session with Indexing Service.

If included, a SELECT statement must appear as the last item in the batch.

Example

The following example represents a batched SET, CREATE VIEW, and SELECT statement.


SET PROPERTYNAME 'D5CDD502-2E9C-101B-9397-08002B2CF9AE'
    PROPID 14 AS MyProperty
    TYPE DBTYPE_STR;
CREATE VIEW #MyView AS
    SELECT FileName, MyProperty
        FROM SCOPE('"/CheckIn"');
SELECT * FROM #MyView

Related topics

CREATE VIEW Statement
SELECT Statement
SET Statement

 

 

Build date: 9/10/2012

Community Additions

ADD
Show:
© 2015 Microsoft