I have an idea for a SQL query but I'm not sure if this is even possible. Let's imagine I have a table with 3 columns:
IDNUMBER, PARAGRAPH, ANIMAL
IDNUMBERis just a key identifier number.PARAGRAPHis always going to have a big block of text, and sometimes it will mention an animal in the paragraph.ANIMALwill always have a set small value like "Dog" or "Monkey".
Is there a way, for each IDNUMBER, to take the value in the Animal column and
use that value for a string search of the corresponding Paragraph column? I'm not sure if I would need to assign the Animal value to some sort of string variable for each loop? This is much more of conceptual question at this point because I'm not sure if this is even possible in SQL, but something like:
SELECT
idnumber, paragraph, animal
FROM
zootable
WHERE
paragraph NOT LIKE ('%currentAnimalValue%')
Sorry this one is so hand-wavy, I'm just looking for a sanity check on this one. Thanks for any help/wisdom you can provide! :)
pantsin it and the animal wasants.