hi
how can i select name something like A-C, D-F, etc
if i want to select name start with A-D, what is the SQL statement suposed to be??? thx
Ada Alex Carl David
select * from t where substring(name from 1 for 1) between 'A' and 'D'
Originally posted by Lars Berg select * from t where substring(name from 1 for 1) between 'A' and 'D' [/B]
Originally posted by Lars Berg
[/B]
thx
what is substring(name from 1 for 1) mean??
substring: part of the string name: your column name from 1: start position: from first character for 1: length of the substring that is extracted: 1 character
so it selects records where the first character from a given column if it is between a and d.