GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Call function in FROM clause (SQLite - json_each or MySQL - json_table) · Issue #60 · JavaScriptor/js-sql-parser Open Labels DescriptionIt seems unsupported to call functions from within the FROM clause. Working example for SQLite: SELECT one.name, group_concat(j.value, ', ') FROM one, json_each(one.stringArray) AS j GROUP BY one.id Table CREATE TABLE one ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, stringArray TEXT CHECK(json_valid(stringArray)) ) Data: INSERT INTO "one" ("id", "name", "stringArray") VALUES ('1', 'John Doe', '["apple","banana","cherry"]'); INSERT INTO "one" ("id", "name", "stringArray") VALUES ('2', 'Alice Smith', '["banana","grape","cherry"]'); INSERT INTO "one" ("id", "name", "stringArray") VALUES ('3', 'Bob Johnson', '["banana","apple","grape"]'); Update 1: also does not work with the SELECT people.* FROM t1, JSON_TABLE(json_col, '$.people[*]' COLUMNS ( name VARCHAR(40) PATH '$.name', address VARCHAR(100) PATH '$.address') ) people; Reacted by Matheus Paes Maciel and Gabriel A. da Rosa Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |