WHERE clause with multiple LIKE entries [message #374294] |
Mon, 04 June 2001 18:20 |
Carl Colburn
Messages: 7 Registered: June 2001
|
Junior Member |
|
|
Hi,
Have VB6 app working on Oracle 8.
Two questions:
1. How do you specify numerical values in a "like" statement when searching on wildcards. For example, if I have data values:
ABCWWWWW
ABC11111
ABC22222
ABC33333
I would like to select all values that are ABC followed by numbers, not letters. Such as "...WHERE type like 'ABC%'", but need % to reference any number but not any letter.
2. I need to write a WHERE clause in my SELECT statement that searches for multiple "LIKE" values. For example, all values that start with "ABC1%" and "ABC2%", but not "ABC3%".
"...WHERE type like 'ABC1%' OR 'ABC2%'".
"...WHERE type in (like 'ABC1%', 'ABC2%')
I know this syntax doesn't work, but shows what I need to do.
Thanks in advance.
|
|
|