InputName Element (ADF)

Specifies the view or table that contains input data for the condition action.

语法

<ConditionAction>
    ...
    <InputName>

Element Characteristics

Characteristic Description

Data type

string, between 1 and 128 characters in length.

Default value

None.

Occurrence

Optional once per ConditionAction element. If you do not specify the input schema, the input must be in the dbo schema.

Updates

You can modify, add, or delete this element when updating the application.

Element Relationships

Relationship Elements

Parent element

ConditionAction Element (ADF)

Child elements

None.

备注

When you use a condition action, you must specify which view or table contains the event data. The fields from the view or table are used to build a new view for the event or scheduled rule. The condition action selects data from the event or scheduled rule view.

Typically, the InputName value is the name of an event view or event chronicle:

  • If the condition action is in an event rule, the input is typically an event view, which has the same name as an event class.
  • If the condition action is for a scheduled rule, the input is typically an event chronicle.

For more information about condition actions, see 定义条件操作.

示例

The following example shows how to define a condition action. The query in the Transact-SQL expression selects data from the MyAppSchema.WeatherEventRule view, which contains data from the subscription class and from the MyAppSchema.WeatherEvents event view.

<ConditionAction>
    <SqlLogin>[MyLowPrivLogin]</SqlLogin>
    <SqlUser>[MyLowPrivUser]</SqlUser>
    <InputName>WeatherEvents</InputName>
    <InputSchema>MyAppSchema</InputSchema>
    <SqlExpression>
        INSERT INTO MyAppSchema.WeatherNotifications(SubscriberId, 
        DeviceName, SubscriberLocale, City, Forecast) 
        SELECT [Subscription.SubscriberId], [Subscription.DeviceName], 
            [Subscription.SubscriberLocale], [Input.City], 
            [Input.Forecast]
        FROM MyAppSchema.WeatherEventRule;
    </SqlExpression>
</ConditionAction>

请参阅

参考

Application Definition File Reference

概念

Instance Configuration File Reference

其他资源

定义条件操作
定义订阅规则

帮助和信息

获取 SQL Server 2005 帮助