Freigeben über


SqlExpression Element for ComputedField (ADF)

Specifies a valid Transact-SQL expression that computes the field value.

Syntax

<NotificationClasses>
    <NotificationClass>
        ...
        <Schema>
            ...
            <ComputedFields>
                <ComputedField>
                    ...
                    <SqlExpression>

Element Characteristics

Characteristic Description

Data type

string, between 0 and 4,000 characters in length.

Default value

None.

Occurrence

Required once per ComputedField element.

Updates

Can be modified, but not added or deleted, when updating the application.

Element Relationships

Relationship Elements

Parent element

ComputedField Element (ADF)

Child elements

None.

Hinweise

A Transact-SQL expression is a combination of identifiers, values, and operators that the database engine can evaluate to get a result. You can use any expression that can be part of a SELECT statement. The terms of the expression can be any of the following:

  • Constants.
  • Calls to functions.
  • The notification fields defined in the ADF (but not computed fields).
  • The following built-in notification fields:
    • SubscriberId
    • DeviceName
    • DeviceTypeName
    • DeviceAddress
    • SubscriberLocale
    • DeliveryChannelName

For more information, see Ausdrücke (Datenbankmodul).

If you update a SqlExpression element, updating the application deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the Microsoft SQL Server tables used by this notification class. Any data existing in the original SQL Server tables is permanently deleted.

Beispiel

The following example shows a populated SqlExpression element. The expression here converts the stock price to the nvarchar data type.

<SqlExpression>
    CONVERT(NVARCHAR(10), StockPrice, 1)
</SqlExpression>

Siehe auch

Verweis

Application Definition File Reference

Andere Ressourcen

Definieren des Benachrichtigungsschemas
CONVERT (Transact-SQL)
Ausdrücke (Datenbankmodul)
Aktualisieren von Instanzen und Anwendungen

Hilfe und Informationen

Informationsquellen für SQL Server 2005