I have a table uploadedFiles which I have a column assign_users_id which has multiple users in a single cell:
+---------+-------------+----------------+
| File_id | file_Name | assign_users_id|
+---------+-------------+----------------+
| 1 | file1 | 101,102 |
| 2 | file2 | 99,101 |
| 3 | file3 | 100 |
| 4 | file4 | 80,90,100 |
+---------+-------------+----------------+
My user table like this:
+---------+-----------+
| user_id | user_Name |
+---------+-----------+
| 101 | Farhat |
| 99 | Rizwan |
| 80 | Sajid |
| 90 | Alex |
+---------+-----------+
Now I need to create a join between user_id
and assign_users_id
to get the user name.
This is my required output:
+----------+-----------------+-----------------+
|file Name | user_Name | assign_users_id |
+----------+-----------------+-----------------+
| file1 | Farhat,Ali | 101,102 |
| file2 | Ale,Farhat | 99,101 |
| file3 | Farh | 100 |
| file4 | Ali,usman,Farh | 80,90,100 |
+----------+-----------------+-----------------+