On 15-06-2011 20:48, David Lyon wrote: > > normally if I want to select within a range of numbers I can do something > like this: > > sqlite3 $db "select * from SNPS where $Start >= 1 and $Start <= 100000" > ...... > how do I do the same select statement where the field are pre-appended with > a word and a colon eg "chr19:" here are some sample data points below, how to > I do a select statement on that asking to ignore the 'chr19:' and return a > listed based the digits eg select * from SNPS where $Start >= 1 and $Start > <= 1000" > and then returns "chr19:200" > >
select * from SNPS where substr($Start,7) between 1 and 1000 http://www.sqlite.org/lang_corefunc.html downside of this that a table-scan will be performed to get the results.... -- Luuk _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

