troubleshooting Question

Use column to search string column

Avatar of Southern_Gentleman
Southern_GentlemanFlag for United States of America asked on
Microsoft SQL Server
2 Comments1 Solution96 ViewsLast Modified:
I'm doing a small audit on our data and
I want to take a column that has a long string that separates product models with a comma and see if any of those models are not valid from  separate table column. This validation is based on the model column of the manufacturer table.

So the manufacturer table has the following data:
Model    |   manufacurerid  | manufacturername
xxx1       |         1                     |  delta
xxx2       |         1                     | delta
xxx3       |         3                     |  alpha
xxx4       |         2                     |  beta
xxx5       |         1                     | delta
xxx6       |         3                     |  alpha


The manufacturerenrollment table has the following data:

ManufacturerID  |  Model
1                            |   xxx1, xxx2, xxx4, xxx5
3                            |  xxx3, xxx6

- So i want to find out what model and manufacturer from the manufacturer table does match in the model column of the manufacturerenrollment table.

So the results would be the following because the xxx4 belongs to manufacturer 2 and not 1:
model   | manufactuerid   |   manufacturer
xxx4       |       2                    | beta

I would prefer not to use the contains function only for the mere fact that i don't have the rights to do a full-text index in the manufacturerenrollment table.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros