需要使用管道参数中的动态数据函数将参数插入字符串中。尝试过反斜杠、双反斜杠、单引号和@、@@等方法,但都无法成功。只需要一个简单的方法来转义字符串中的单引号。
我其实已经找到了。显然应该是两个单引号。我忘记在两个地方都加上了,第二个地方我只加了一个反斜杠!
@concat('select count(*) Count from ProcessedFiles where Filename=''', item().name, '''')
@replace('select count(*) Count from ProcessedFiles where Filename=''{MyFileName}''', '{MyFileName}', item().name)
@concat('select count(*) Count from ProcessedFiles where Filename=''', item().name, '''')
。 - bdforbes@replace('select count(*) Count from ProcessedFiles where Filename=''{MyFileName}''', '{MyFileName}', item().name)
- jeancallisti