For example
select custName
from Customer
where custName like '%john%';
My parameter is custName, so in query Eclipse Birt report, I used
select custName
from Customer
where custName like '%?%';
But it wont work, how can I make this possible. I need help. C开发者_StackOverflowan anyone solve this matter?
You need to include the wildcard characters (%
) in the parameter value.
For example
-- Parameter Value = "%john%"
SELECT custName from Customer WHERE custName LIKE ?
In Standard SQL, for which the concatenation symbol is ||
it would be:
WHERE custName LIKE '%' || :param_name || '%';
Guessing a translation to Eclipse:
WHERE custName LIKE CONCAT('%', param_name, '%');
For what it's worth, nearly 4 years later, this seems to work:
WHERE custName LIKE '%' || ? || '%'
精彩评论