Sure. Just be aware that if you have digest delivery, you won't have
I support PASS, the Professional Association for SQL Server.
<eckart_612@hotmail.com> wrote:
>Joe, thanks for the reply. Is it possible to use part of the notification
>alert in the subject. For instance, each notification i send out has a
>ticket # that is a field in the alert as well as in the Email format file.
>Can i use this ticketno (or any other field) in the subject?
>
>Thanks,
>kevin
>
>"Joe Webb" <joew@webbtechsolutions.com> wrote in message
>news:bumlm2hhq19vuvcb4j91a4fpk5dlllpv6i@4ax.com...
>> Hi Kevin -
>>
>> I routinely do something like this in my emails.
>>
>> <Field>
>> <FieldName>Subject</FieldName>
>> <SqlExpression>'ABC Motorworks Press Release - ' + CONVERT
>> (NVARCHAR(30), GETDATE(), 101)
>> </SqlExpression>
>> </Field>
>>
>>
>> Constants and functions are valid in the SqlExpression element.
>>
>> HTH...
>> Joe
>>
>>
>> --
>> Joe Webb
>> SQL Server MVP
>>
http://www.sqlns.com >>
>>
>> ~~~
>> Get up to speed quickly with SQLNS
>>
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811 >>
>> I support PASS, the Professional Association for SQL Server.
>> (
www.sqlpass.org)
>>
>>
>>
>> On Tue, 21 Nov 2006 14:12:26 -0600, "Kevin Eckart"
>> <eckart_612@hotmail.com> wrote:
>>
>>>I would like to include a variable in the Subject field of an email sent
>>>from Notification Services. Is there a way to do this? What is the
>>>limitation of the <SQLExpression></SQLExpression> tag in the Protocol? Is
>>>this where I would grab my variable?
>>>
>>>Below is the protocol portion of my ADF file. Any help would be greatly
>>>appreciated.
>>>
>>>Thanks,
>>>Kevin E.
>>>
>>><Protocols>
>>> <Protocol>
>>> <ProtocolName>SMTP</ProtocolName>
>>> <Fields>
>>> <Field>
>>> <FieldName>Subject</FieldName>
>>> <SqlExpression>'HD Notification'</SqlExpression>
>>> </Field>
>>> <Field>
>>> <FieldName>From</FieldName>
>>> <SqlExpression>N'okreports@okind.com'</SqlExpression>
>>> </Field>
>>> <Field>
>>> <FieldName>To</FieldName>
>>> <SqlExpression>DeviceAddress</SqlExpression>
>>> </Field>
>>> <Field>
>>> <FieldName>Priority</FieldName>
>>> <SqlExpression>N'Normal'</SqlExpression>
>>> </Field>
>>> <Field>
>>> <FieldName>BodyFormat</FieldName>
>>> <SqlExpression>N'html'</SqlExpression>
>>> </Field>
>>> </Fields>
>>> <ProtocolExecutionSettings></ProtocolExecutionSettings>
>>> </Protocol>
>>></Protocols>
>>>