Skip to content
Advertisement

Extract string between double quotes in SQL

I have a string and I need to return the characters between the double quotes

‘((“Name 1” and “Name 2”) or “Name 3”)

I need to return

I have used the function below to split the string but I am getting the (( and the Or and AND etc .. which I don’t want and unfortunately I can’t be certain of all the other characters that could be included so removing them or replacing them isn’t really feasible.

I know this code will return the string between 2 delimiters

is there any way to combine the 2 and return the required output?

Thanks

Advertisement

Answer

Give this a try; I kept the debugging variables in the output table

Or this, based on the idea of receiving two different delimiters:

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