I have two records in keyskill tables name "SAP FICO" and "FICO SAP". When I search the record with "FICO SAP". I want to get both records. Is there any way to fetch this record if I search?
I want this both as result if I search, I tried using like as below, but it fetches only one.
search = "FICO SAP"
KeySkill.where("name LIKE ?", "%#{search}%")
This is my Keyskill table data (created like this in table)
<KeySkill id: 50, name: "SAP FICO", relevant_experience: "1", created_at: "2019-01-06 08:48:54", updated_at: "2019-01-06 08:48:54", deleted_at: nil>
<KeySkill id: 51, name: "FICO SAP", relevant_experience: "1", created_at: "2019-01-06 08:48:55", updated_at: "2019-01-06 08:48:55", deleted_at: nil>