TRIM bug

From: James Bellinger <james(at)illusorystudios(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: TRIM bug
Date: 2016-10-06 23:42:28
Message-ID: 6a162190-c3f7-4972-b0ae-9049e519302e@illusorystudios.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello,

I just ran into this and narrowed it down to TRIM. Without the TRIM(),
it works fine.

In MS Access,
SELECT DISTINCT [Name] FROM [Customer Information] WHERE [Name] IS NOT
NULL AND LEN(TRIM([Name])) > 1 ORDER BY [Name] ASC;
becomes
SELECT DISTINCT "public"."Orders"."Name" FROM ("public"."Orders" LEFT
OUTER JOIN "public"."POs" ON ("public"."Orders"."OnlineCode" =
"public"."POs"."OnlineCode" ) ) WHERE (NOT(("public"."Orders"."Name" IS
NULL ) ) AND (char_length(ltrim(rtrim("public"."Orders"."Name" )))))> 1
) ) ORDER BY "public"."Orders"."Name"
As you can see, there is an extra right parenthesis. (Customer
Information is an Access query onto Orders, in case the name change is
confusing from my test example.)

Thanks!

James

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Adrian Klaver 2016-10-06 23:55:52 Re: TRIM bug
Previous Message Johan Levin 2016-10-04 15:03:30 Re: Server side prepared statements 'bit' parameters generate errors.