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

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -