I first highlighted this bug during the SC5 phase. It applies to MySQL, MS-SQL, Access, SQLlite and seemingly it still hasn’t been fixed.
Here’s the SQL
SELECT [B]Allocations.ID,[/B] Allocations.Area, AllocAreas.UserCode, AllocAreas.name, Allocations.Portion, AllocPortions.UserCode, AllocPortions.name,
Allocations.Row, AllocRows.UserCode, AllocRows.Name, Allocations.Number, Allocations.`Sub-Number`, Allocations.Interment, Allocations.Status, RegisterData.ID AS RegisterIndex
FROM (AllocRows INNER JOIN (AllocPortions INNER JOIN (AllocAreas INNER JOIN AllocSectionIndex ON AllocAreas.ID = AllocSectionIndex.AREA)
ON AllocPortions.ID = AllocSectionIndex.PORTION) ON AllocRows.ID = AllocSectionIndex.ROW) INNER JOIN (Allocations LEFT JOIN RegisterData ON Allocations.ID =
RegisterData.AllocationCode) ON AllocSectionIndex.ID = Allocations.SectionID
ORDER BY Allocations.Area, Allocations.Portion, Allocations.Row, Allocations.Number, Allocations.Interment;
Note the field name in bold. The above runs in SC8’s SQL builder.
At runtime, and error occurs. The first two CHARS are dropped off the first field in the select statement. See attached screen dump. Compare the SQL to the fields list at left.
Aliasing the field has no effect in SC8. Aliasing the table name has no effect in SC8.
Thank you