Re: [sqlite] Can't create table from a trigger

2008-05-27 Thread Igor Tandetnik
Stephen Oberholtzer <[EMAIL PROTECTED]> wrote: > On Tue, May 27, 2008 at 4:15 PM, > [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > One of the fields takes few values (say, company website id), but new > ids >> are >> added from time to time. I would prefer to dynamically create a set >> of

Re: [sqlite] Can't create table from a trigger

2008-05-27 Thread Jay A. Kreibich
On Tue, May 27, 2008 at 05:15:27PM -0300, [EMAIL PROTECTED] scratched on the wall: > I need to handle tables with several million records, on realtime, from RAM. > for the improved locality of reference plus reduced Do you mean a :memory: database? RAM doesn't really have locality of

Re: [sqlite] Can't create table from a trigger

2008-05-27 Thread Stephen Oberholtzer
On Tue, May 27, 2008 at 4:15 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >De: [EMAIL PROTECTED] > >Fecha: 27/05/2008 19:56 > > > >It's not supposed to, according to > >http://sqlite.org/lang_createtrigger.html . The syntax > >only allows select, insert, update and delete statements. > >

Re: [sqlite] Can't create table from a trigger

2008-05-27 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: >> De: [EMAIL PROTECTED] >> Fecha: 27/05/2008 19:56 >> >> It's not supposed to, according to >> http://sqlite.org/lang_createtrigger.html . The syntax >> only allows select, insert, update and delete statements. >> >> What are you trying to achieve? > > I need to handle

Re: [sqlite] Can't create table from a trigger

2008-05-27 Thread [EMAIL PROTECTED]
>De: [EMAIL PROTECTED] >Fecha: 27/05/2008 19:56 > >It's not supposed to, according to >http://sqlite.org/lang_createtrigger.html . The syntax >only allows select, insert, update and delete statements. > >What are you trying to achieve? I need to handle tables with several million records, on

Re: [sqlite] Can't create table from a trigger

2008-05-27 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: > Does not work: > > CREATE TABLE ttt ( t INTEGER PRIMARY KEY ); > > CREATE TRIGGER ttt_new_trigger AFTER INSERT ON ttt FOR EACH ROW > BEGIN >CREATE TABLE uuu ( u INTEGER PRIMARY KEY ); > END; It's not supposed to, according to

[sqlite] Can't create table from a trigger

2008-05-27 Thread [EMAIL PROTECTED]
Does not work: CREATE TABLE ttt ( t INTEGER PRIMARY KEY ); CREATE TRIGGER ttt_new_trigger AFTER INSERT ON ttt FOR EACH ROW BEGIN CREATE TABLE uuu ( u INTEGER PRIMARY KEY ); END; SQL error: near "CREATE": syntax error If I try the CREATE TABLE outside the trigger, it succeds. If I replace