Re: [sqlite] Creating a view

2012-10-18 Thread Gert Van Assche
Thanks, Igor & Keith. gert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Creating a view

2012-10-17 Thread Keith Medcalf
I believe that unless you have constrained nR1 nR2 nR3 ... nR6 as NOT NULL then select (select RefItem from REFTABLE where id=nR1), (select RefItem from REFTABLE where id=nR2), (select RefItem from REFTABLE where id=nR3), (select RefItem from REFTABLE where id=nR4), (select RefItem

Re: [sqlite] Creating a view

2012-10-17 Thread Igor Tandetnik
On 10/17/2012 4:23 PM, Gert Van Assche wrote: I don't know how to do something very simple like this. I have two table and I would like to see the value of one table as it is expressed in the other. CREATE TABLE [REFTABLE] (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, [RefItem] CHAR); INSERT I

[sqlite] Creating a view

2012-10-17 Thread Gert Van Assche
All, I don't know how to do something very simple like this. I have two table and I would like to see the value of one table as it is expressed in the other. CREATE TABLE [REFTABLE] (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, [RefItem] CHAR); INSERT INTO [REFTABLE]([RefItem]) VALUES('One'); I

Re: [sqlite] Creating a view on an ATTACHed database

2007-01-31 Thread drh
"Jeff Godfrey" <[EMAIL PROTECTED]> wrote: > > Out of curiosity though, is there a reason why ... a view > [across multiple attached databases] can't be stored permanently? When you open a database and first try to use it, SQLite scans the SQLITE_MASTER table and parses the schema. Views are sto

Re: [sqlite] Creating a view on an ATTACHed database

2007-01-31 Thread Jeff Godfrey
From: <[EMAIL PROTECTED]> "Jeff Godfrey" <[EMAIL PROTECTED]> wrote: So, is it not possible to create a view across a "main" and an "attached" database? If I recall, you can create a TEMP VIEW across attached databases. Thanks for the tip. Adding TEMP is all it took to get things workin

Re: [sqlite] Creating a view on an ATTACHed database

2007-01-31 Thread drh
"Jeff Godfrey" <[EMAIL PROTECTED]> wrote: > > So, is it not possible to create a view across a "main" and > an "attached" database? > If I recall, you can create a TEMP VIEW across attached databases. But you can't create a persistent view because such a view would not make sense to a processe

[sqlite] Creating a view on an ATTACHed database

2007-01-31 Thread Jeff Godfrey
Hi All, I have an open sqlite3 database (name = dbSerial), to which I've attached a 2nd database (name = dbParent). Now, I'm trying to create a view by joining a view from dbSerial with another view from dbParent. Attempting to create the view generates the following error: Error: view [tco

[sqlite] creating a view on an attached database

2006-10-09 Thread P Kishor
I am attaching external database 'b' to database 'a', ATTACH DATABASE b AS d_b; and then trying to create a view that uses tables from the attached database, CREATE VIEW v AS SELECT d_b_t.col, d_a_t.col FROM d_b.tbl AS d_b_t JOIN tbl AS d_a_t ON... I get the following error -- view v cannot