Regexp search SQL query fields

I have a repository of SQL queries and I want to understand which queries use certain tables or fields. Let’s say I want to understand what queries use the email field, how can I write it? Example SQL …

Oracle SQL Join an ID on a field with a list of IDs some with ranges

First of all, its not my database and I cannot change it:) This is an oracle database I have a table with 2 ID fields code and subcode: Table1 ID Code Subcode 1 300 010 2 400 050 3 300 060 I …

How to insert yes or no value into flag column based on regex query

I have a simple update that works great work analyzing a US based telephone number. It correctly inserts a Y in the phone_flag column based on the following query. UPDATE database.table SET phone_flag …

MySql regexp on column with html

I have a table with HTML content in which I need to select all rows containing a span element with the CSS class “glyphicon glyphicon-film” with some text content, but exclude all rows …

Match specific string before user input

I have the following strings: SDZ420-1241242, AS42-9639263, SPF3-2352353 I want to “escape” the SDZ420- part while searching and only search using the last digits, so far I’ve tried RLIKE …

How to extract text between two words in Oracle

This is the source string: random foobar “name” : “Jack Ryan”, other random stuff In Oracle query, how do I extract Jack Ryan from it? I guess I am looking for whatever is between “name” : ” and “,…

Regular Expression to extract string after seeing ā€œnumber + one letter + [comma or whitespace]ā€ in Bigquery

I am trying to extract: Abbey Grove Abbey Grove Abbey Road View Abbey Road Abbey Terrace Abbey Wood Road Abbey Grove from 23a, Abbey Grove 43a Abbey Grove Block 509a Abbey Road View 511 Abbey Road …

Snowflake SQL, how to lookahead until a certain occurrence of a value

Below is a sample of the text that I am working with. — info1: * val: “A” — Type: * answers: * – ! * val: “B” * – ! * val: “C” — info2: * val: “D” — …

How to extract the package name using regexp_substr

I’d like to extract the package name using regexp_substr. For example: create or replace package body something.pkg_test is I want that: pkg_test I tried to use lookbehind just to ignore “…

Use of Regex in SQL query

create table numbers (number varchar(10)); insert into numbers (number) values (‘9999999999’), (‘5532003644’), (‘1212121205’), (‘1103220311’), …