我想做这样的事情:
SQL.Text := Format('select foo from bar where baz like ''%s%''',[SearchTerm]);
当然,Format 不喜欢最后一个“%”。那么我怎样才能摆脱它呢?\%
? %%
?
或者我必须这样做:
SQL.Text := Format('select foo from bar where baz like ''%s''',[SearchTerm+'%']);
?
在格式字符串中使用另一个 %:
SQL.Text := Format('select foo from bar where baz like ''%s%%''',[SearchTerm]);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)