this query does not work!! lazarus / 16-Databases ---------------------------------------------------------------------- cpalx · 2009-02-25 17:38 this query works perfectly in pgAdmin (postgresSQL 8.3) select a_field || '-' || another_field from a_table but does not in Lazarus (0.96-1 in winXP SP3) Any idea? ---------------------------------------------------------------------- Marc · 2009-02-25 19:23 Sample code ? ---------------------------------------------------------------------- cpalx · 2009-02-25 20:03 in postgreSQL table: docserial varchar(3), docnumber varchar(7), .... select  docserial ||  '-' || docnumer as theNum from guia result: TheNum --------- 123-2345555 231-2323232 134-4545454 it works in pgAdmin (PostgreSQL) but not in query in Lazarus ---------------------------------------------------------------------- Loesje · 2009-02-26 14:05 When you've used a TSQLQuery with a TPQConnection, try to set TSQLQuery.ParseSQL to false and tell what the result is. Also give the error-message you've got. ---------------------------------------------------------------------- cpalx · 2009-02-28 03:18 i tried in Linux using PQconection, there is not error message, but the result always is (blob). Here i use Lazarus 0.9.27 (2009-1.21) with FP 2.2.3 in windows, i dont know why does not work with PQconecction, i work with Zcomponents here i use Lazaraus 0.9.6-1 with FP 2.2.3 (AMD64) ---------------------------------------------------------------------- Loesje · 2009-03-02 21:32 Oh, when it returns '(blob)' it handles the given data as a blobfield. Thus in fact it's working nicely. Try to read the value using field.asstring and you'll see that it's there. Because you append some string without giving any maximum length, postgres makes a blob of it, is my guess. Try to use a cast in your expression.