Original Message:
Sent: Sep 22, 2023 11:59 AM
From: Loren Watts
Subject: sql Regular Expressions with Report Manager
Sorry for the confusion. I received confirmation this morning that our CA WA Workstation uses DB2 for Report Manager. Until this research, I was not familiar with REGEXP_LIKE, and first tested it in an Oracle table outside ESP. I personally do not use DB2 sql directly on tables. For this current topic I am using the SQL tab of CA WA Report Manager GUI for the sql statement.
SELECT FULLNAME
FROM ESPRSD2P.ESP_JOB_HIST
WHERE REGEXP_LIKE(FULLNAME, '^CK[DFM]M$');
Original Message:
Sent: Sep 22, 2023 11:38 AM
From: Lucy Zhang
Subject: sql Regular Expressions with Report Manager
Hi Loren,
Guess we misunderstood you. We thought you use Oracle database with the Report Server.
Do you use DB2 with our Report Server? If yes, how will you issue the SQL command directly from DB2 database?
The SQL command should have sent to the DB2 and the returned error should be from your DB2 database.
Thank you,
Lucy
Original Message:
Sent: Sep 22, 2023 11:28 AM
From: Loren Watts
Subject: sql Regular Expressions with Report Manager
Thank you Lucy. That statement brings this error -
Server Message
ESPWSS Error:
ESPWSS69444E DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601,
SQLERRMC=<END-OF-STATEMENT>;WITHIN IS LIKE BETWEEN = ^=
> >= < <= ^< ^> <> != !, DRIVER=3.72.54

Original Message:
Sent: Sep 22, 2023 10:21 AM
From: Lucy Zhang
Subject: sql Regular Expressions with Report Manager
Hi Loren,
Sorry for the late response.
Will you try as below and see if it work?
SELECT FULLNAME
FROM your_table
WHERE REGEXP_LIKE(FULLNAME, '^CK[DFM]M$');
Thank you,
Lucy
Original Message:
Sent: Sep 13, 2023 12:02 PM
From: Loren Watts
Subject: sql Regular Expressions with Report Manager
Thank you Lucy.
Using sql against my Oracle table, I must use the Oracle function REGEXP_LIKE.
Is there documentation for Report Manager SQL syntax? And use of Regular Expressions in SQL?
Function Name Description
REGEXP_LIKE Similar to the LIKE operator, but performs regular expression matching instead of simple pattern matching
REGEXP_LIKE(srcstr, pattern [,match_option])
Original Message:
Sent: Sep 12, 2023 09:54 AM
From: Lucy Zhang
Subject: sql Regular Expressions with Report Manager
Hi Loren,
Have you tried to issue the same SQL command from the related database? Does it work?
Generally the Report Manager will just pass the SQL command to the database.
If it works when issued directly from the database and not working from ESP report manager, please open a support case and we will look further.
Thank you,
Lucy
Original Message:
Sent: Sep 11, 2023 12:28 PM
From: Loren Watts
Subject: sql Regular Expressions with Report Manager
If there are existing Broadcom documentation pages for using sql with Report Manager, it would be great to digest that information.
I'm looking for the specific sql syntax to use Regular Expressions in Report Manager.
I want to use a Regular Expressions character set [DFM] and can't get the syntax in Report Manager sql.
Underscore works but grabs more than I want.
WHERE FULLNAME LIKE '%CK_M%'
I want to limit hits to third characters D or F or M in the four characters CK_M
only hits matching CKDM or CKFM or CKMM
WHERE FULLNAME LIKE '%CK[DFM]M%'
above statement does not error but returns no rows.
'%CK_M%' as I wrote returns what I want, plus unwanted rows.