sql - MySQL join based on regexp -


I have table product where is a related product from the column . Related products contain colored materials ID ( column productivity ) by colon, e.g. Abc-123: foo-prod: ada69, etc. Due to some poor design, there is a case that a product can be removed from the product table and the relevant products can still be referred to in the column.

So I need a SQL query, which goes through all the rows in the table of products, explodes the data and checks the related product columns (hence the title is exploded) and it Observe whether each reference product exists in the same product table. However, I am a newbie on SQL and there is a problem writing the join / regexp query to do this.

Any help would be appreciated!

MySQL mail regexp , But unfortunately can not return the matching substrings.

You better select from the product P zone product from FIXIN_SET (rel.id, repplace (p.related, ':', ',' '))


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -