#17

Solved

invalid SQL on derived table

Reported by snowbird122 on Ajax Scaffold · 25/04/2006 19:44:18

Assigned to:
Nobody
Priority:
Normal
Status:
Solved
Category:
None
Version:
3.1.2

after script/generate ajax_scaffold Part, goto localhost:3000/parts/list

and get error:
DBI::DatabaseError: Execute
OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server
The column prefix ‘parts’ does not match with a table name or alias name used in the query.
HRESULT error code:0×80020009
Exception occurred.: SELECT * FROM (SELECT TOP 25 * FROM (SELECT TOP 25 * FROM parts ORDER BY parts.id asc ) AS tmp1 ORDER BY parts.id DESC) AS tmp2 ORDER BY parts.id asc

The SQL is invalid because the actual table name (parts) is used in the order by clause instead of the derived table names (tmp1 and tmp2)

Attachments Upload

No attachment has been uploaded, yet.


Loading comments...