Re: [sqlite] unexpected row value error

2018-01-23 Thread Dan Kennedy
On 01/23/2018 07:55 PM, Mark Brand wrote: Hi, The 6th SELECT example below throws an error. This seems unexpected, especially given the contrast with example 3, which differs only in lacking a seemingly unrelated JOIN. Am I overlooking something? Removing the PRIMARY KEY from table x also a

Re: [sqlite] unexpected row value error

2018-01-23 Thread petern
Confirmed that way too. CREATE TABLE x ( a, b, PRIMARY KEY (a, b) ); CREATE TABLE y ( a ); INSERT INTO x VALUES (1, 1), (1, 2); INSERT INTO y VALUES (1); SELECT * FROM x JOIN y ON y.a = x.a WHERE (x.a, x.b) IN (VALUES (1,2)); --Error: sub-select returns 2 columns - expected 1 SELECT * FROM x JO

Re: [sqlite] unexpected row value error

2018-01-23 Thread petern
Confirmed. SQLite 3.22.0 2018-01-12 23:38:10 dec3ea4e4e6c4b1761ddc883a29eaa50dcd663ce6199667cc0ff82f7849d4f2a CREATE TABLE x ( a, b, PRIMARY KEY (a, b) ); CREATE TABLE y ( a ); CREATE TABLE z ( a, b ); INSERT INTO x VALUES (1, 1), (1, 2); INSERT INTO y VALUES (1); INSERT INTO z VALUES (1, 1), (1

Re: [sqlite] unexpected row value error

2018-01-23 Thread curmudgeon
Probably won't help but the final one works with SELECT in double brackets SELECT * FROM x JOIN y ON y.a = x.a WHERE (x.a, x.b) IN ( ( SELECT a, b FROM z ) ); . -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlit

[sqlite] unexpected row value error

2018-01-23 Thread Mark Brand
Hi, The 6th SELECT example below throws an error. This seems unexpected, especially given the contrast with example 3, which differs only in lacking a seemingly unrelated JOIN.  Am I overlooking something? Removing the PRIMARY KEY from table x also avoids the error somehow. Seen on version 3