Oct 19, 2004 #1 nickotine Programmer Joined Nov 27, 2001 Messages 23 Location GB Help Please. I am trying to insert Multiple values in a LIKE statement, I.e. select object, bin from ourhouse t where t.rowid = :rowid and bin = '*' and store like ('EL%','TA%') I keep getting a message saying Missing Right Parenthesis. Thanks in advance.
Help Please. I am trying to insert Multiple values in a LIKE statement, I.e. select object, bin from ourhouse t where t.rowid = :rowid and bin = '*' and store like ('EL%','TA%') I keep getting a message saying Missing Right Parenthesis. Thanks in advance.
Oct 19, 2004 1 #2 sem Programmer Joined Jun 3, 2000 Messages 4,709 Location UA You may compare only against single format mask. Use OR instead. Code: select object, bin from ourhouse t where t.rowid = :rowid and bin = '*' and (store like 'EL%' or store like 'TA%') This is a common rule, but your specific case may be rewritten as: Code: select object, bin from ourhouse t where t.rowid = :rowid and bin = '*' and substr(store,1,2) in ('EL','TA') Regards, Dima http://seminihin.narod.ru Upvote 0 Downvote
You may compare only against single format mask. Use OR instead. Code: select object, bin from ourhouse t where t.rowid = :rowid and bin = '*' and (store like 'EL%' or store like 'TA%') This is a common rule, but your specific case may be rewritten as: Code: select object, bin from ourhouse t where t.rowid = :rowid and bin = '*' and substr(store,1,2) in ('EL','TA') Regards, Dima http://seminihin.narod.ru