On Sat, 09 Feb 2008 17:16:57 +0100, you wrote:
>On Sat, 9 Feb 2008 23:51:03 +1100, you wrote:
[..]
>>create table MyTable( MyField );
>>alter table MyTable rename to MyNewTable;
>>select SQL from SQLite_Master;
>>
>>which gives:
>>
>>CREATE TABLE 'MyNewTable'( MyField )
>>
>>SQLite should
> Is it possible to refine/combine the above two sets of queries into one?
Yes. It's possible:
A)
SELECT e.to_node_id AS node_id FROM edge e WHERE
e.from_node_id = $node_id
UNION
SELECT e.from_node_id AS node_id FROM edge e WHERE
e.to_node_id = $node_id
B)
SELECT
dick128 wrote:
> I have a tcl app that I want to use tclsqlite with but when I load the dll
> tcl exits without any error messages. did catch, etc. still exits. tries
> 3.5.4 and 3.5.6 - same result.
>
What version of Tcl?
I have used all of the recent tclsqlite3.dll files with almost all of
ok, after embarrassedly realizing that I phrased my question terribly
(thanks Alexander), here is a simplification and rewording of it --
(a) First I find all the "other nodes" in edges where a given $node_id
is either the from_node_id or to_node_id.
SELECT node_id, node_name
FROM (
For your pseudo-code for (b) i can suggest this, but i still not
understand why you need it :-/
SUBQUERY =
SELECT e.to_node_id AS node_id FROM edge e WHERE
e.from_node_id = $node_id
UNION
SELECT e.from_node_id AS node_id FROM edge e WHERE
e.to_node_id = $node_id
On Sat, 9 Feb 2008 23:51:03 +1100, you wrote:
>Following up:
>> This also says that SQLite will accept a single quoted literal as an
>> identifier in certain situations. I'm not aware of any other
>> database that used single quotes that way, but I'm sure there was
>> one somewhere along
Hello Kishor,
a: if you want to find all edges, why your query returns nodes?
So I think it should be like this:
SELECT edge_id FROM edge WHERE from_node = $node OR to_node = $node;
This query is not good, because "OR" drop out any index optimization.
But As I see your example doesn't have
I have a tcl app that I want to use tclsqlite with but when I load the dll tcl
exits without any error messages. did catch, etc. still exits. tries 3.5.4 and
3.5.6 - same result.
___
sqlite-users mailing list
sqlite-users@sqlite.org
last_row_id is not a function. It is a predefined value.
Gilles wrote:
> On Sat, 9 Feb 2008 08:41:56 -0500, "Igor Tandetnik"
> <[EMAIL PROTECTED]> wrote:
>> INSERT INTO phones (tel,id_customers) VALUES ('1234567',last_row_id());
>
> Thanks, but I'm getting an error (FWIW, I'm using 3.5.4):
>
>
"Gilles" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 9 Feb 2008 08:41:56 -0500, "Igor Tandetnik"
> <[EMAIL PROTECTED]> wrote:
>> INSERT INTO phones (tel,id_customers) VALUES
>> ('1234567',last_row_id());
>
> Thanks, but I'm getting an error (FWIW, I'm using 3.5.4):
I have a table of nodes and edges like so
CREATE TABLE edge (
edge_id INTEGER PRIMARY KEY,
from_node_id TEXT,
to_node_id TEXT,
..
);
CREATE TABLE node (
node_id INTEGER PRIMARY KEY,
node_name TEXT,
..
);
Given a $node_id, I want to find (a) all
On Sat, 9 Feb 2008 08:41:56 -0500, "Igor Tandetnik"
<[EMAIL PROTECTED]> wrote:
>INSERT INTO phones (tel,id_customers) VALUES ('1234567',last_row_id());
Thanks, but I'm getting an error (FWIW, I'm using 3.5.4):
sqlite> BEGIN;INSERT INTO customers (id,name) VALUES (NULL,'John
Doe');INSERT
"Gilles" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> =
> BEGIN;
> INSERT INTO customers (id,name) VALUES (NULL,'John Doe');
> ;How to get ROW_ID?
> INSERT INTO phones (tel,id_customers) VALUES ('1234567',ROW_ID);
> COMMIT;
> =
INSERT INTO phones (tel,id_customers) VALUES
Hello
I'm an SQL newbie, and would like to know how to perform the following
INSERT's:
=
BEGIN;
INSERT INTO customers (id,name) VALUES (NULL,'John Doe');
;How to get ROW_ID?
INSERT INTO phones (tel,id_customers) VALUES ('1234567',ROW_ID);
COMMIT;
=
The two records are linked, since a
Hi All,
Short question:
What's the best way (or your way) of facilitating an updatable view (a
view that will accept insert, delete and update, propagating changes
back to the underlying tables), especially for columns that are joined
to satisfy normalization?
Long version of question:
Following up:
> This also says that SQLite will accept a single quoted literal as an
> identifier in certain situations. I'm not aware of any other
> database that used single quotes that way, but I'm sure there was
> one somewhere along the line.
It is a pain that SQLite accepts single
Hello,
Is there any special arguments to ./configure for building sqlite3
(shell.c) shared linked to sqlite library?
--
Alexander Batyrshin aka bash
bash = Biomechanica Artificial Sabotage Humanoid
___
sqlite-users mailing list
sqlite-users@sqlite.org
Hello,
I found that there is some mess in quickstart manual -
http://www.sqlite.org/quickstart.html
At C code example some lines ends with " argv}; hd_resolve_one {0}; hd_puts {);"
--
Alexander Batyrshin aka bash
bash = Biomechanica Artificial Sabotage Humanoid
18 matches
Mail list logo