SDM 12.6
I'm trying to create some basic WEBI reports based on the activity log, specifically to find tickets with specific status changes. For example:
Status changed from '[Initial]' to 'Closed'
If I put something like "Description Matches pattern" and the above (with % at the end), nothing is matched. When I check the generated SQL it seems like it is converted the single quotes in to two singles, resulting in:
SELECT
alg.request_ref_num,
alg.description
FROM
alg
WHERE
(
alg.description LIKE '%Status changed from ''[Initial]'' to ''Closed''%'
AND
alg.request_ref_num IN ( '309843' )
)
I've tried escaping the single quote ( \'[Initial]\' ), replacing it with _ ( _[Initial]_ )
If I cut the query off earlier
Status changed from%
That works, but will potentially find more than the desired results. Really hoping I'm just missing something simple, anyone else gotten this sort of query to work?
Also, the ref_num is just in there to limit the query for testing, the end goal is to find tickets with certain status changes.
Edit: Kept testing, turns out its the square brackets causing the problem, not the quotes. Trying the following worked
Status changed from % to 'Closed'%
Escaping the bracket \[ didn't seem to work either