Skip to content
Advertisement

SQL – get specific text from string

I have column with this strings:

I need to get from the string ONLY the contact_type__* part (appears only once in each row)

Any suggestions?

Advertisement

Answer

You could use regexp function regexp_extract(), like:

This will match on string 'contact_type__ followed by a sequence of letters, numbers, or underscore (which are commonly defined as word characters).

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement