我正在尝试使用LIKE Query,但这并没有给我任何结果集,也没有给我一个错误。它确实为我提供了完整搜索的结果集,例如,example @ test.com,但为例子为空
var FIND_CUSTOMER_PREPARED_STATEMENT = WL.Server.createSQLStatement(
"SELECT CUST_ID, " +
"EMAIL_ADDR, PHONE_NUM, FIRST_NAME, LAST_NAME, ADDR1, ADDR2, CITY_NAME, PROV_ST_CDE, " +
"POST_ZIP_CDE, NOTES_TXT, DLR_CDE, ANALYS_TXT FROM " +
"GS_DBA.CUI_CUST_INFO WHERE " +
"(lower(EMAIL_ADDR) LIKE lower(?) or ? is null) and " +
"(PHONE_NUM = ? or ? is null) and " +
"(lower(FIRST_NAME) = lower(?) or ? is null) and " +
"(lower(LAST_NAME) = lower(?) or ? is null) and" +
" Order By LAST_NAME, FIRST_NAME"
);
function findCustomer(emailAddress, phoneNumber, firstName, lastName)
{
return WL.Server.invokeSQLStatement({
preparedStatement : FIND_CUSTOMER_PREPARED_STATEMENT,
parameters : ["%"+emailAddress+"%", emailAddress,
phoneNumber, phoneNumber,
firstName, firstName,
lastName, lastName]
});
}