[sqlite] Sqlite subqueries

2015-02-25 Thread Rob Richardson
A Google search for "USS Yorktown" turned up the following: "On September 21, 1997, a division by zero error on board the USS Yorktown (CG-48) Remote Data Base Manager brought down all the machines on the network, causing the ship's propulsion system to fail." RobR -Original Message-

[sqlite] Sqlite subqueries

2015-02-25 Thread russ lyttle
On 02/25/2015 10:31 AM, Rob Richardson wrote: > A Google search for "USS Yorktown" turned up the following: > > "On September 21, 1997, a division by zero error on board the USS Yorktown > (CG-48) Remote Data Base Manager brought down all the machines on the > network, causing the ship's

[sqlite] Sqlite subqueries

2015-02-25 Thread russ lyttle
On 02/25/2015 09:40 AM, Igor Tandetnik wrote: > On 2/25/2015 9:16 AM, russ lyttle wrote: >> To eliminate the need to reference a table would require combining 300 >> tables into one table. > > Yes. > >> A user editing entries for one space could crash >> the whole system. > > I don't see how

[sqlite] Sqlite subqueries

2015-02-25 Thread Igor Tandetnik
On 2/25/2015 9:16 AM, russ lyttle wrote: > To eliminate the need to reference a table would require combining 300 > tables into one table. Yes. > A user editing entries for one space could crash > the whole system. I don't see how this follows. > That's basically what happened aboard the

[sqlite] Sqlite subqueries

2015-02-25 Thread russ lyttle
On 02/24/2015 08:53 PM, Igor Tandetnik wrote: > On 2/24/2015 8:42 PM, russ lyttle wrote: >> The 'a' table defines spaces to be controlled, the 'b' tables the >> control schedules and parameters. >> It would not be unreasonable to assume the 'a' table has >100 rows. >> Each row in the 'a' table is

[sqlite] Sqlite subqueries

2015-02-25 Thread R.Smith
There's been many discussions on this topic, you can search for it, but I will try to recap in short: SQL does not work like this, not in SQLite or any other SQL engine may an entity construct be referenced by an uncontrolled data value. Of course it is easy to get around this in code whereby

[sqlite] Sqlite subqueries

2015-02-24 Thread Paul Sanderson
Search the mail list for "Column name as a variable" for a similar discussion Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work

[sqlite] Sqlite subqueries

2015-02-24 Thread Igor Tandetnik
On 2/24/2015 8:42 PM, russ lyttle wrote: > The 'a' table defines spaces to be controlled, the 'b' tables the > control schedules and parameters. > It would not be unreasonable to assume the 'a' table has >100 rows. > Each row in the 'a' table is associated with 3 'b' tables, all the names > known

[sqlite] Sqlite subqueries

2015-02-24 Thread russ lyttle
Thanks. The application is for an energy conservation application. The 'a' table defines spaces to be controlled, the 'b' tables the control schedules and parameters. It would not be unreasonable to assume the 'a' table has >100 rows. Each row in the 'a' table is associated with 3 'b' tables,

[sqlite] Sqlite subqueries

2015-02-24 Thread Igor Tandetnik
On 2/24/2015 4:37 PM, russ lyttle wrote: > I'm trying to create a field in a table to hold the name of a second > table, then retrieve that name for use. You can't. SQL doesn't work this way. Reconsider your design. -- Igor Tandetnik

[sqlite] Sqlite subqueries

2015-02-24 Thread russ lyttle
I got the "Using SQLite" book and didn't find the answer there, or in a Google, DuckDuckGo, or Gigiblast search. I'm trying to create a field in a table to hold the name of a second table, then retrieve that name for use. The code below is the simplest of all the things I've tried. Can anyone say