> BareFeetWare <list....@barefeetware.com> wrote: >> I have some source data that includes a "Silo And Region" column of two >> words appended together, such as 'NorthPlains', >> 'SouthPlains', 'NorthSlopes', 'SouthSlopes' etc. I want to split them into >> two columns. >> >> How can I do this in SQLite? A regex or offset/position and replace function >> would take care of this (by looking for the second >> uppercase letter), but there's no regex or offset/position function >> provided.
On 16/06/2011, at 10:11 PM, Igor Tandetnik wrote: > You could do something like > > ltrim(substr("Silo And Region", 2), 'abc...xyz') > > to extract the second part (spell out the rest of the alphabet in place of > '...'). The first part is left as an exercise for the reader. Great advice, Igor, thank you. Works well. I maintain that we really need some string searching ability, built into SQLite. It's a major omission that is often an issue. Thanks, Tom BareFeetWare -- Comparison of SQLite GUI tools: http://www.barefeetware.com/sqlite/compare/?ml -- iPhone/iPad/iPod and Mac software development, specialising in databases develo...@barefeetware.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users