sql - Selecting part of URL for query -


i'd select url values, (optional) ? character in each one. i've tried this:

select user_id, regexp_extract(properties.client.url,'[^?]*') url 

but error exactly 1 capturing group must specified. there way achieve this?

i'd return like:

123, http://www.google.com/hello 

rather than:

123, http://www.google.com/hello?why 

it's not clear dbms use error self-describing. try using 1 capturing group (...) error message suggests:

select user_id, regexp_extract(properties.client.url,'([^?]*)') url 

Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -