WHERE clause with multiple LIKE values [message #374296] |
Mon, 04 June 2001 18:37 |
Carl Colburn
Messages: 7 Registered: June 2001
|
Junior Member |
|
|
Hi,
Have VB6 app working on Oracle 8.
2 questions:
1. Is there a way to make the wildcard % specify a numerical value instead of letters? If I have the following:
ABCWWWWW
ABC11111
ABC22222
ABC33333
I want to say "...WHERE type like 'ABC%' where the record "ABCWWWWW" will be excluded because the % looks for a numerical value and excludes letters. Can you also say something like 'ABC_%', where the _ would look for the fourth character in the string to be numeric and not a letter?
2. Need to write a WHERE clause with multiple LIKEs. For example, if I want only the 1's and 2's, not 3's:
"...WHERE type like 'ABC1%' or 'ABC2%"
"...WHERE type in (like 'ABC1%', 'ABC2%')
I know the above syntaxes are wrong, but give an idea of what I want to do.
Thanks in advance.
|
|
|