problem whit multi value in query
hi
i need create a query to send do statement very strange.
i have in input a stream of result
es.(value from 'BIN' to 'FIN') and i need create a query take all element between this 2 element
es. if in input i have ' A' and 'C' i seacrh in table all record:
select * from TABLE where FIELD like 'A%' or FIELD like 'B%' or FIELD like 'C';
exist 1 command in sql for this query(remember i not know parametrer IN
or exist 1 class or method create this string to insert into query?
pls help me tanks
null
[583 byte] By [
mirko81a] at [2007-11-27 5:41:01]

# 1
SQL supports less than and greater than comparison of strings.
The select statement
select * from TABLE where FIELD >= 'A' and FIELD <='C'
should do the same like the one you have posted. nevertheless I am not sure, that this is what you wanted.
The selects will also return the rows where FIELD is either 'A' or 'C' . Those rows are strictly spoken not between the two values ('A' and 'C') .
If you want case independency look for upper or lower case coversion in the syntax of the database you are using.