Here is the scenario
I have 4 tables
tbl_shirtbrand (shirt_ID, Color_ID, Description, SubCategoryID)
tbl_category (categoryID, categoryName)
tbl_subcategory(SubcategoryID, CategoryID, SubcategoryName)
tbl_color(Color_ID, ColorName)
Sample data
tbl_shirtbrand ("1", "1,2,3", "Polo", "1" )
tbl_category ("1", "Tshirt")
tbl_subcategory("1", "1", "Sleeveless")
tbl_color("1", "Red")
tbl_color("2", "Blue")
tbl_color("3", "Green")
I want to get the ColorName of ever shirtbrand. As you can see Color_ID in shirtbrand is separated by comma, Shirt_ID 1 have 3 colors on it- 1,2,3 which is Red, Blue, Green. And we know that Shirt_ID 1 belongs to Tshirt and Sleeveless.
HOw to make a query of this??? This one is so challenging for me
🙂
I hope you can help me on this. Thanks