Cache SQL Query Regular Expression
Hi,
Can anyone please help me how to use regular expression/wild character on a sql query for a pattern like C00.0 to C00.9, C01.0 to C01.9 and so on until C77.0 to C77.9 .
Thanks for your help
Thanks
Jude
Product version: IRIS 2021.1
Hi @Jude Mukkadayil
Please read the below documentation, this might be helpful
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
Thanks
Hi Jude,
Explanation:
If needing the full range between C00 to C77 then:
Option 1 - Second character is "0" to "6"
Third character is numeric "0" to "9"
Option 2 - Second character is "7"
Third character is numeric "0" to "7"
Some further notes. These patterns also work unmodified in IRIS Object Script so you might have code:
So same pattern for both your SQL and ObjectScript.
The pattern AND IF structure may get a bit visually daunting so you can use indirection operator "@" to move the pattern into a Class Parameter. This also allows you to reuse the same match expression but manage the expression in one place:
If you see this double quoted pattern in parameter, code or in a configuration global, it is a clue it is applied in a pattern via indirection by the application.
Cheers,
Alex
Thanks Alex & Muhammad.