中的半单引号; 这给了我结果:[email protected]; [email protected]; [email protected] 这就是我想要的。这是一个名为&电子邮件的宏变量。我需要在任何两封电子邮件之间使用分号,但在最后一封电子邮件后没有分号 但对于在她的电子邮件地址中使用单引号(例如O'Connor)的人, %str会自动使用%STR(单位:%)单引号 。 [email protected]; [email protected]; lily.O'[email protected])将导致错误。 我怎样才能得到结果[email protected]; [email protected]; lily.O'[email protected] 通过%str或任何其他宏引用函数,如%bquote或任何其他否则保持单引号无法匹配?当使用%STR([email protected]; [email protected]; [email protected])时,sas%str或%bquote希望保留宏变量
的EMAIL列表从Excel列表导入和Excel文件中的单引号之前,我已经把%:lily.O%'[email protected] ,我怎样才能获得宏变量&电子邮件。值内的%str(),即: [email protected]; [email protected]; lily.O%'[email protected] 然后我可以把宏变量放入%str )?
嗨,这个电子邮件列表是一个宏变量。它是excel中的一个列表,并在SAS中导入。我在excel中的单引号之前添加了这个%,并且我从excel表导入了电子邮件列表。 –
请扩展您的问题以显示您正在收到的错误(以及您正在运行哪些代码以获取错误)。 %STR()应该足以掩盖单引号,但取决于您如何使用它,您可能会删除宏引用或在错误的时间引用。简单的例子'%let emaillist =%STR([email protected]; [email protected]; lily.O%'[email protected]);'工作正常 – Quentin