Hello all,
I have a database called 'Customer' within it I have a table called 'Product' and within this product table I have a column called 'Class' and ' Client'. Now this class column has single values and numerous values in the column separated by a ; it looks like this:
Class Client
1 a
5 b
6 c
8;4 d
7 e
2 f
1 g
3 h
2;1 i
8;5;9;10 j
10 k
what i am trying to accomplish is separate all of the classes by client and apply a text value to the class. for example here is the text value I want to correspond with the numerical values under the class column. (unfortunately these text values are not in the database and I dont have permission to create a table).
Class Poduct
1 cat
2 dog
3 bird
4 fish
5 tree
6 car
7 desk
8 TV
9 door
10 bike
11 radio
12 disk
This is what the desired output would look like.
Client Class
a cat
b tree
c car
d TV
d fish
e desk
f dog
g cat
h bird
i dog
i cat
j tree
j TV
j door
j bike
k bike
How would I do this? I am using Microsoft SQL Server Management Studio
Thank you!
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.