Mule select where like查询,通配符失败

Mule select where like查询,通配符失败,mule,spring-jdbc,Mule,Spring Jdbc,如何在Mule中使用通配符执行具有相似参数的查询 我希望使用执行一个查询 select OrganizationID from organizations where webaddress like '%#[flowVars['FromAddressDomain']]' <jdbc:outbound-endpoint exchange-pattern="request-response" queryKey="LookUpOrg" queryTimeout="-1" connector-r

如何在Mule中使用通配符执行具有相似参数的查询

我希望使用执行一个查询

select OrganizationID from organizations where webaddress like '%#[flowVars['FromAddressDomain']]'

<jdbc:outbound-endpoint exchange-pattern="request-response" queryKey="LookUpOrg" queryTimeout="-1" connector-ref="IssueTrakDataConnector" doc:name="DatabaseLookupOrg">
        <jdbc:query key="LookUpOrg" value="select OrganizationID from organizations where webaddress like ('%#[payload]')"/>

    </jdbc:outbound-endpoint> 
但是由于引号的存在,这会导致错误,删除它们会产生不同的错误

前者=false}。消息负载的类型为:字符串异常原因::com.microsoft.sqlserver.jdbc.SQLServerException:索引1超出范围

请帮忙

问候
桑托什

尝试使用CONCAT功能

select OrganizationID from organizations where webaddress like CONCAT('%', #[payload:?])

取得进展后,我将有效负载与通配符字符串连接起来,并将其作为参数传递,这就成功了。有没有更好的方法来实现这一点。使用此查询语句时,我遇到的错误是根异常堆栈跟踪:com.microsoft.sqlserver.jdbc.SQLServerException:“@P0”附近的语法不正确。