本文介绍了如何在数据库电子邮件存储过程中应用HTML中的条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 这是我发送电子邮件的存储过程。它工作正常。但是如何检查html格式中的条件 CREATE PROCEDURE [dbo]。[Condition_Status](@view nvarchar(30),@ MEMAIL CHAR(150))AS DECLARE @tableHTML NVARCHAR(MAX) DECLARE @emailsubject char(150) SET @tableHTML = N'< BODY topmargin =0leftmargin =0rightmargin =0bottommargin =0marginwidth =0marginheight =0style =bgcolor =#ffffff>'+ N' 推荐答案 如果我的理解是正确的,您可以在选择中使用case语句。 If my understanding is correct, You can use the case statement in the select.select (Case @view when 'xxx' then heading1 else heading2 end) from table 并将您剩余的查询and put your remaining query 这篇关于如何在数据库电子邮件存储过程中应用HTML中的条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-01 07:24