Works in 3.7.9 SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> CREATE TABLE t1 (A1 INTEGER NOT NULL,A2 INTEGER NOT NULL,A3 INTEGER NOT NULL,A4 INTEGER NOT NULL,PRIMARY KEY(A1)); sqlite> REPLACE INTO t1 VALUES(1,11,111,1111); sqlite> REPLACE INTO t1 VALUES(2,22,222,2222); sqlite> REPLACE INTO t1 VALUES(3,33,333,3333); sqlite> CREATE TABLE t2 (B1 INTEGER NOT NULL,B2 INTEGER NOT NULL,B3 INTEGER NOT NULL,B4 INTEGER NOT NULL,PRIMARY KEY(B1)); sqlite> REPLACE INTO t2 VALUES(1,88,888,8888); sqlite> REPLACE INTO t2 VALUES(2,99,999,9999); sqlite> sqlite> SELECT (SELECT GROUP_CONCAT(CASE WHEN a1=1 THEN'A' ELSE 'B' END) FROM t2),t1.* FROM t1; A,A|1|11|111|1111 B,B|2|22|222|2222 B,B|3|33|333|3333
On my Windows 3.7.12 version it gets a segfault. On my Unix 3.7.13 version I get the misuse of aggregate Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Luigi [lu...@emme4.it] Sent: Friday, June 15, 2012 8:31 AM To: sqlite-users@sqlite.org Subject: EXT :[sqlite] error group_concat CREATE TABLE t1 (A1 INTEGER NOT NULL,A2 INTEGER NOT NULL,A3 INTEGER NOT NULL,A4 INTEGER NOT NULL,PRIMARY KEY(A1)); REPLACE INTO t1 VALUES(1,11,111,1111); REPLACE INTO t1 VALUES(2,22,222,2222); REPLACE INTO t1 VALUES(3,33,333,3333); CREATE TABLE t2 (B1 INTEGER NOT NULL,B2 INTEGER NOT NULL,B3 INTEGER NOT NULL,B4 INTEGER NOT NULL,PRIMARY KEY(B1)); REPLACE INTO t2 VALUES(1,88,888,8888); REPLACE INTO t2 VALUES(2,99,999,9999); SELECT (SELECT GROUP_CONCAT(CASE WHEN a1=1 THEN'A' ELSE 'B' END) FROM t2),t1.* FROM t1; from Sqlite 3.7.12 return error misuse of aggregate Thanks in advance. Luigi _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users