cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

sql query regex

vijay_thappeta
Newcomer

I have an sql query where i want to use a regex to capture all values.
eg: <query>... name="regex"...

which regex i should use

3 REPLIES 3

Radu
Dynatrace Pro
Dynatrace Pro

Can you please post a sample query and your expected output?

Thanks.

select * from xyz where ((abc = 'XYZ' or abc= 'Some_activity') and istask = 0 and location = 'Europe')

which regex i should use instead of 'Europe' to capture any location values whenever location changes like location = 'US'

Hello Vijay,

Try this:

select \* from.*where \(\(.*\) and istask = 0 and location = '(.*?)'\)

Also, If you want more robust Regex, could you pl. post more cases of queries?

Regards, Rajesh.