11 Feb
2002
11 Feb
'02
12:37 p.m.
Dear Zopers I wonder if anyone has a ZSQL Method that will take a single text string, parse it for 'AND' and 'OR' then create the appropriate sql statement. A very simple example could be like this: user enters 'dog AND biscuit' SQL statement created is like: SELECT * FROM TABLE1 WHERE (FIELD1 LIKE '%dog%' AND FIELD1 LIKE '%biscuit%') OR (FIELD2 LIKE '%dog%' AND FIELD2 LIKE '%biscuit%') Yes, I know that I can do the above very simply, but how about when the string contains multiple sections with AND, OR, NEAR, NOT? I think its difficult, so I am hoping someone else has already done it! A quick search on the lists hasn't revealed anything obvious. Regards Neil