Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Evaluate expression
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Evaluate expression
Miscellaneous
Thread ID:
01168770
Message ID:
01168770
Views:
54
Hi All,

I am designing a stored procedure that will send an email to all receipients
in a queue. I decided to replace the following line in order to lookup and set the subject of the email dynamically:
set @subject = 'IPO # ' + ltrim(rtrim(str(@iIpoId))) + ' Notification'
to:
set @subject = (select cEmailSubject from webforms.dbo.lookup_emailTemplate where iEmailTemplateID = @iEmailTemplateID)
where the cEmailSubject field is:
'IPO # ' + ltrim(rtrim(str(@iIpoId))) + ' Notification'

In a result the email title is:
'IPO # ' + ltrim(rtrim(str(@iIpoId))) + ' Notification'

How can I get it to evaluate and display something like :

IPO # 1234 Notification

Thank you,
Daniel
Next
Reply
Map
View

Click here to load this message in the networking platform