Re: [sqlite] Split Function for SQLite?

2011-08-25 Thread Max Vlasov
On Thu, Aug 25, 2011 at 9:34 AM, Max Vlasov wrote: > > Also theoretically it is possible to use virtual tables for this. So > when your virtual query implementation accepts list in some way ('23, > 14, 1, 7, 9') and returns the table when querying > I tried to implement

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Max Vlasov
On Tue, Aug 23, 2011 at 7:10 AM, Gregory Moore wrote: > I need to split up a list of items in a single row so they each have > their own row. > You can read about my trick query solving partly this task with a trick

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Michael Stephenson
users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Wednesday, August 24, 2011 11:09 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Split Function for SQLite? > Did you see the code in the link I provided?  It's a function that

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Pavel Ivanov
> Did you see the code in the link I provided?  It's a function that can be > added to SQL. Note, it's not SQL. SQL doesn't support "adding functions". SQL is all about SELECT/INSERT/UPDATE/DELETE + DDL commands (like CREATE TABLE). That's it. So the link you provided is a function that can be

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Gregory Moore
I don't know know whether it's a SQLite "issue" or not. Did you see the code in the link I provided? It's a function that can be added to SQL. I just need to find out whether it can be added to SQLite and if so, then how to add it. I'd like to know before I try it whether I would run the

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread J.M. Royalty
On 8/24/2011 9:05 PM, Gregory Moore wrote: > I'm thinking it's parameters would be the name of a column and a character to > designate where the string wold be separated. It would return multiple rows > and each row would contain a piece of the string. > > In other word, take a table like this:

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Gregory Moore
I'm thinking it's parameters would be the name of a column and a character to designate where the string wold be separated. It would return multiple rows and each row would contain a piece of the string. In other word, take a table like this: c1 c2 --- 1 a; b; c run a statement like

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Igor Tandetnik
On 8/24/2011 9:36 PM, Gregory Moore wrote: > Thanks for answering! Can this not be added as a function? What parameters would such a function take, and more interestingly, what would its return value be? -- Igor Tandetnik ___ sqlite-users mailing

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Gregory Moore
Thanks for answering! Can this not be added as a function? On Aug 22, 2011, at 10:43 PM, Igor Tandetnik wrote: > Gregory Moore wrote: >> I need to split up a list of items in a single row so they each have >> their own row. >> >> Basically I need to take this: >> >>

[sqlite] Split Function for SQLite?

2011-08-23 Thread Gregory Moore
function. I know SQLite allows addition of functions. I did find a few different implementations of split functions, but there were from full SQL and SQL Server sites. Do I need a split function designed specifically for SQLite? How would I go about adding the function so I can use it? Thanks! Greg

Re: [sqlite] Split Function for SQLite?

2011-08-22 Thread Igor Tandetnik
Gregory Moore wrote: > I need to split up a list of items in a single row so they each have > their own row. > > Basically I need to take this: > > Key. Code > -- > 1. V1, v2, v3 > > And convert it to this: > > Key. Code > -- > 1. V1

[sqlite] Split Function for SQLite?

2011-08-22 Thread Gregory Moore
function. I know SQLite allows addition of functions. I did find a few different implementations of split functions, but there were from full SQL and SQL Server sites. Do I need a split function designed specifically for SQLite? How would I go about adding the function so I can use it? Thanks! Greg