It appears that iAnywhere 9.0.2 has some issues using NOT.
Here is the statement that’s working for me now:
SELECT DISTINCT contact.contact_id FROM contact WHERE ( (' ' + categories + ' ') LIKE '% 250% ') ORDER BY contact.contact_id; sQuery: SELECT DISTINCT contact.contact_id FROM contact WHERE ( (' ' + categories + ' ') LIKE '% 250% ') ORDER BY contact.contact_id; It returns 25 records
Here is the reverse of that one that I am trying to execute which finds almost all the records in the database but not the total amount -25 that are set to 250:
SELECT DISTINCT contact.contact_id FROM contact WHERE ( (categories NOT LIKE '% 250') AND (categories NOT LIKE ' %250% ') ) ORDER BY contact.contact_id;
I’ve found in SQL Interactive, even with very simple statements l can’t get the NOT to work no matter how I arrange the syntax.
I went to a SQL expert and he couldn’t figure it out and thought it was very strange.
I talked to one of the Sybase guys and he though it should work.
That's when he suggested this forum.
Anyone with any ideas?