pawelsalawa / sqlitestudio

A free, open source, multi-platform SQLite database manager.
https://sqlitestudio.pl
Other
4.67k stars 571 forks source link

malformed database schema error appears incorrect #5059

Open njamescouk opened 2 months ago

njamescouk commented 2 months ago

Details

[22:15:28] Could not add database malformed database schema (tmpPersonResourcePage)

Steps to reproduce

This applies only to bug reports. If this is a feature request, delete this section.

this is using group_concat with an order by clause:

    group_concat(printf('%d: <a href="../%s">%s</a>', 
                        UkCensus.year,
                        UkCensusSources.location, 
                        substring(UkCensusSources.location, 10)), '<br />
' ORDER BY UkCensus.year)

docs: sqlite/ver_3_44_0/doc/lang_aggfunc.html#group_concat

group_concat(X) group_concat(X,Y) string_agg(X,Y)

The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X.A comma (",") is used as the separator if Y is omitted.

The string_agg(X,Y) function is an alias for group_concat(X,Y). String_agg() is compatible with PostgreSQL and SQL-Server and group_concat() is compatible with MySQL.

The order of the concatenated elements is arbitrary unless an ORDER BY argument is included immediately after the last parameter. 

works with cli sqlite3 3.44

Operating system

This applies only to bug reports. If this is a feature request, delete this section.

windows 7

SQLiteStudio version

This applies only to bug reports. If this is a feature request, delete this section.

ver 3.4.4 32 bit

pawelsalawa commented 2 months ago

The ORDER BY in aggregate functions as added in SQLite 3.44, while SQLiteStudio 3.4.4 comes with SQLite 3.34.1.