MySQL Forums
Forum List  »  Newbie

Use RegEx to join
Posted by: Christian Schrautzer
Date: October 05, 2022 12:54AM

Hi,
in my darabase there are two tables:

parts
id [int(10)]
name [varchar(255)]
info [text]
amount [double]

category
category [varchar(255)]
priority [double]
pattern [text]

In the column 'pattern' there are RegEx patterns defined to specify the categories for the parts. e.g. (.*?screw.*?M6.*?galv.*?) or (.*steel.*?mount.*)

Usually the patterns are executed by program code (searching 'name' & 'info'). Is there a way to use MySql to assign the categories?

Either via some join or by subselect.

Hope there is an idea.

Best regards,
Kevin

Options: ReplyQuote


Subject
Written By
Posted
Use RegEx to join
October 05, 2022 12:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.