我的头发快用完了,希望有人可以帮助确定我的按钮可见性问题。我正在发送一封电子邮件,其中包含“跟踪您的FedEX包裹”和“跟踪您的UPS包裹”按钮中包含的运输跟踪信息。我的问题是两个按钮都可见。我只希望基于@SHIP_VIA = UPS
或FEDEX
看到正确的按钮。这是嵌入在SQL查询中的。
任何帮助将不胜感激。
DECLARE @SHIP_VIA nvarchar(80)
'</table>
<br>
<div>
<! [if mso]>
<% if SHIP_VIA == FEDEX GROUND%>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://www.fedex.com/apps/fedextrack/?tracknumbers=' + @TRACKING + '" style="height:40px;v-text-anchor:middle;width:300px;" arcsize="10%" stroke="f" fillcolor="#d62828">
<w:anchorlock/>
<center style="color:#ffffff;font-family:sans-serif;font-size:16px;font-weight:bold;">
Track Your FedEX Package
</center>
</v:roundrect>
<% else if SHIP_VIA == UPS GROUND%>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://www.ups.com/track?loc=en_US&tracknum=' + @TRACKING + '" style="height:40px;v-text-anchor:middle;width:300px;" arcsize="10%" stroke="f" fillcolor="#d62828">
<w:anchorlock/>
<center style="color:#ffffff;font-family:sans-serif;font-size:16px;font-weight:bold;">
Track Your UPS Package
</center>
</v:roundrect>
<![endif]>
</div>'