I have a string in a column like this.
I have 2 pets. One is "CAT" and "DOG".
I wanted to extract my output as "CAT" and "DOG". Which is the beginning of double quotes to end of double quotes. How can I achieve this using snowflake SQL
>Solution :
Something like this works:
select regexp_substr('I have 2 pets. One is "CAT" and "DOG".', '".*"');
Output:
REGEXP_SUBSTR('I HAVE 2 PETS. ONE IS "CAT" AND "DOG".', '".*"')
"CAT" and "DOG"