Good afternoon all,
I would like to somehow create an extensible query to 'chain' together a selection of regular expressions.
My SQL skills are few and feeble, so I'd love some help.
I currently have no schema built, so the world (or rather database) is your oyster.
I was looking to have a table containing the data:-
and a table contains patterns:-
I would like the query to return the id field of the row which matches all the chained queries.Code:id|name|pattern
Initially, I thought of this:-
Which doesn't really work.
Each REGEXP call should pass on the value it matches to the next; eventually, if all matches, well, match, it would return the row id.