[SOLVED] TSQLQuery.ParseSQL strange behavior lazarus / 16-Databases ---------------------------------------------------------------------- swierzbicki · 2013-10-01 14:47 Hello, I'm using TSQLQuery with TPQConnection. "Calculated SQL fields" are not fetched into TSQLQuery.Fields Such a basic SQL statement can reproduce the problem : Code: [Select]Select 'MY STRING' as MyCalculedField Table.FieldA, Table.FiedB From Table TSQLQuery.FieldsCount will return 2 instead of 3. Only physical fields will be fetched and the 'calculated' one will never show. How can I correct this ? ---------------------------------------------------------------------- LacaK · 2013-10-02 07:31 Try use:  cast('MY STRING' as char(9)) as MyCalculatedField ---------------------------------------------------------------------- swierzbicki · 2013-10-02 08:13 Thank you , this is working