Unanswered: Mild headscratcher - query as locate search string
Before i share the query and the error, here are the premises.
I need to search for text patterns in the description field of my incidents, the text patterns are the descriptions of Configuration items where the configuration are part of a collection.
This works well when i need to search on the ci field because i dont need to use wildcards, with the description however.....
locate (upper(select description from ci where cinum in (select cinum from collectdetails where collectionnum = 'NAMEOFCOLLECTION')), upper(description)) <> 0
BMXAA4210E - Database error number -104 has occurred.
An unexpected token "description from ci where cinum" was found following "locate (upper(select". Expected tokens may include: "<space>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.53.95
It looks like DB" is reading the 1st locate parameter literally as opposed to a nested query.