Discussion:
Retrieval argument, operator issue
(too old to reply)
unknown
2009-11-30 03:35:50 UTC
Permalink
I have a simple report that uses a retrieval argument (that
has a "type" of 'string') that feeds into the where
statement.

The where statement has a column with the "operator" set as
'like' the :asset_number.

The report works when I enter a retrieval argument that is
the entire "asset number", but when I just enter part of an
asset number so that the report would return numerous line
items I get no data. It seems as though the 'like' operator
is not working. Are there certain columns that do not
function with the 'like' operator. I don't get any error
message, just no data when the report is run.

Any thoughts are greatly appreciated.
Terry Dykstra
2009-12-01 05:02:07 UTC
Permalink
The like requires a wildcard (% for 1 or more characters, _ for 1
character) to work.
So some examples:

where yourcol like :asset_number || '%'

or

where yourcol like '%' || :asset_number || '%'


Terry Dykstra [TeamSybase]
Post by unknown
I have a simple report that uses a retrieval argument (that
has a "type" of 'string') that feeds into the where
statement.
The where statement has a column with the "operator" set as
'like' the :asset_number.
The report works when I enter a retrieval argument that is
the entire "asset number", but when I just enter part of an
asset number so that the report would return numerous line
items I get no data. It seems as though the 'like' operator
is not working. Are there certain columns that do not
function with the 'like' operator. I don't get any error
message, just no data when the report is run.
Any thoughts are greatly appreciated.
Loading...