SQLite :: Unable to read sql view which has aggregate functions



  • Hello.
    I have strange error when trying read view (SQlLite) whith aggregate functions to QSqlRelationalTableModel.
    QSqlRelationalTableModel->select() failed with message:
    "no such column: group_concat(trolleybus.id) Unable to execute statement"
    Similar error occurred when i try replace/link foreign key to show column "group_concat(trolleybus.id)" in QSqlRelation.
    SQLite:
    @CREATE VIEW [view_maintenance_trolleybus] AS
    SELECT maintenance.id, maintenance.name, group_concat(trolleybus.id)
    FROM maintenance
    LEFT OUTER JOIN
    trolleybus
    ON
    maintenance.id = trolleybus.maintenance_id
    GROUP BY maintenance.id;@

    Same SELECT works as intended in QSqlQueryModel.

    Qt: 4.8, Windows, msv2010


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.