I'm honestly not sure how to phrase this. So I'm just going to explain the issue
In order to find as many possible matches as possible, I currently run a piece of code that converts data to upper case, removes spaces and invalid characters. For example:
Hi there, I'm very happy! -> HITHEREIMVERYHAPPY
My database is reaching a size where it's no longer efficient to run the piece of code that checks each line in a ResultSet
, so I was wondering if this is possible in SQL
somehow?
SELECT * FROM Data WHERE Input.replaceAll("[^a-zA-Z0-9]", "").replace(" ", "").toUpperCase() = INPUT AND Response.replaceAll("[^a-zA-Z0-9]", "").replace(" ", "").toUpperCase() = RESPONSE