LKH5000
LKH5000

Reputation: 35

How to make a single field contain multiple pieces of data that are individually sortable?

I am trying to make a column than contains project types.The projects could be any combination of nine different categories.

For example, I have some projects that would be categorized as Education, some that would be Health, some that would be Food Security, etc.

But I have some projects that are both Health and Food Security. In the drop-down sort I would like to be able to check Health and sort everything that contains Health, even if it also has other project types. I do not want to have to check and individual category called "Health and Food Security" in order to get the project to come up.

Upvotes: 2

Views: 34

Answers (1)

sagi
sagi

Reputation: 40481

Then you're looking for LIKE to search for partial match:

SELECT * FROM YourTable t
WHERE t.project_types LIKE '*Health*'

Upvotes: 1

Related Questions