On 4/4/2014 4:12 PM, peter korinis wrote:
Does SQL have any string commands, like REGEXP or something else to
strip out the commas, and transform the string into multiple discrete
values, then use those perhaps in a SQL subquery . or something like
that?

Do the processing outside of SQLite.

Let's say you have an entry "4,66,51,3009,2,678, .", and you want to get
the "66" out of there to feed back into another query.  Well, just do
whatever magic you like to get that entry into your program, then use
regexp or character array indexing or Tcl [split $val ,] or whatever to
get "66", and finally use that as a parameter in your query.

Doing all this inside SQLite will add complexity with no performance
benefit.  It's not like SQLite is a database server over a slow network
link which you want to use as little as possible.  It's a library
embedded in your application, which means it's on equal footing with all
your other application code.

Also yes, do normalize your database design.

--
Andy Goth | <andrew.m.goth/at/gmail/dot/com>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to