Quoth Dariusz Matkowski , on 2010-12-03 18:46:20 -0500:
> Phobic
What?
---> Drake Wilson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Phobic
- Original Message -
From: Simon Slavin [mailto:slav...@bigfraud.org]
Sent: Friday, December 03, 2010 06:36 PM
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Subject: Re: [sqlite] Degrees of separation
On 3 Dec 2010, at 11:14pm, Drake Wilson wrote:
>
On 3 Dec 2010, at 11:14pm, Drake Wilson wrote:
> Another would be to
> rewrite the query to union the two directions together
You could do this with a VIEW, of course. Have a VIEW that reflects the UNION
of the 'know' table with its elements in the opposite order. Then query this
VIEW
Quoth "Black, Michael (IS)" , on 2010-12-03 17:07:23
-0600:
> INSERT INTO "know" VALUES('a','b');
> INSERT INTO "know" VALUES('a','c');
> INSERT INTO "know" VALUES('a','d');
> INSERT INTO "know" VALUES('aa','b');
> INSERT INTO "know" VALUES('b','bb');
> INSERT INTO "know"
I need a bit of SQL expertise here...I'm close but not close enough and joins
kind of confuse me.
Given the following table of 1-degree separations I want to get the 2-degree
separations
CREATE TABLE know(p1 varchar,p2 varchar);
CREATE INDEX know_idx on know(p1,p2);
INSERT INTO "know"
5 matches
Mail list logo