#1 2013-07-04 08:57:54

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

TSQLTable sorting with a join

With a TSQLTable made from the SQL statement below using TSQLRestClientURI.ExecuteList sorting fails on the authors.name field (using a TSQLTableToGrid). Tracing through the code it seems TSQLTable.InitFieldTypes sets this field's type to sftID instead of sftUTF8Text which is the defined type of authors.name. I guess this is because authors.name is referred to by an record id. Is sorting on a joined field implemented yet or am I going about it the wrong way?

Select books.title, authors.name from books left join authors on books.author=authors.ID

Offline

Board footer

Powered by FluxBB