ScriptCase interprets SQL incorrectly.
Create a grid application with nested SQL:
SELECT t0.Item_Name, (SELECT AVG(Price) FROM t_inventory WHERE id = t0.iid) AS aprice FROM items t0
The SC SelectLimit() function will have an error in the order-by parameter: “nm_sel_esp order by Item_Name asc, 12, 0”
[LIST=1]
The full error will be:
Error
Error while accessing the database:
Unknown column 'Item_Name' in 'order clause'
SelectLimit(SELECT t0.Item_Name, (SELECT AVG(Price) FROM t_inventory WHERE id = t0.iid) AS aprice FROM items t0 ) nm_sel_esp order by Item_Name asc, 12, 0)
The workaround is to create a VIEW, but if you must interpret the SQL, then you should interpret it correctly, and not add arbitrary clauses like ORDER BY.