다음을 통해 공유


ComputedField Element (ADF)

Provides a location for defining a computed notification class field.

구문

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

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Required once or more per ComputedFields element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

ComputedFields Element (ADF)

Child elements

FieldName Element for NotificationClass/Schema/ComputedFields/ComputedField (ADF)

SqlExpression Element for ComputedField (ADF)

DigestGrouping Element for ComputedField (ADF)

주의

Computed fields are never stored in the notifications table. Instead, they are computed immediately before the notification data is passed to the content formatter.

Computed fields allow you to make use of the calculation facilities of Microsoft SQL Server. Use of computed fields can improve the performance of your notification application, can reduce the work that you must do in the content formatter, and enables you to use the rich formatting and conversion capabilities in Transact-SQL.

ms145901.note(ko-kr,SQL.90).gif중요:
If you add or delete a ComputedField element, updating the application deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the SQL Server tables used by this notification class. Make sure to back up your application database before updating the application.

The following example shows a populated ComputedField element. The computed field converts the stock price into a formatted string.

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

참고 항목

참조

Application Definition File Reference

관련 자료

CAST 및 CONVERT(Transact-SQL)
알림 스키마 정의
인스턴스 및 응용 프로그램 업데이트

도움말 및 정보

SQL Server 2005 지원 받기