Re: [sqlite] I have a stumper

2011-11-14 Thread Matt Young
You saved the day! On Mon, Nov 14, 2011 at 2:25 PM, Igor Tandetnik wrote: > On 11/14/2011 5:03 PM, Matt Young wrote: > >> OK,I found the gotcha. I can swap out the target table in a view, but I >> cannot read the rowids from a view. >> > > You can, if you make them part of

Re: [sqlite] I have a stumper

2011-11-14 Thread Igor Tandetnik
On 11/14/2011 5:03 PM, Matt Young wrote: OK,I found the gotcha. I can swap out the target table in a view, but I cannot read the rowids from a view. You can, if you make them part of the view: create view MyView as select rowid, * from MyTable; It might be better though to give an explicit

Re: [sqlite] I have a stumper

2011-11-14 Thread Matt Young
OK,I found the gotcha. I can swap out the target table in a view, but I cannot read the rowids from a view. So, do I have t, are rowids unavailable in a view? > > > On Mon, Nov 14, 2011 at 10:25 AM, Nico Williams wrote: > >> I thought nowadays SQLite3 was smart enough to

Re: [sqlite] I have a stumper

2011-11-14 Thread Matt Young
I am still learning its behavior. But, my experiment still works, even in embedded. I want lots of procedures working on the same table format, with different table names. So far, I write the procedures using table view. As of right now, I can change the table names using alter table rename and

Re: [sqlite] I have a stumper

2011-11-14 Thread Nico Williams
I thought nowadays SQLite3 was smart enough to re-prepare a prepared statement when the schema changes. Nico -- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] I have a stumper

2011-11-14 Thread Simon Slavin
On 14 Nov 2011, at 1:52pm, Matt Young wrote: > SQL needs a create schema, then the statement can be prepared against a > know schema, and swap out the table pointer at run time. The problem of > one great sql procedure that works on many different table of the same > format. > > I have a work

Re: [sqlite] I have a stumper

2011-11-14 Thread Matt Young
SQL needs a create schema, then the statement can be prepared against a know schema, and swap out the table pointer at run time. The problem of one great sql procedure that works on many different table of the same format. I have a work around. ___

Re: [sqlite] I have a stumper

2011-11-14 Thread Igor Tandetnik
Matt Young wrote: > I install a prepared statement, but it cannot allow the table identifiers > to be replaced with sqlite3_bind. Of course not. How do you expect SQLite to prepare a query execution plan without knowing which tables it's going to execute against? > If