Skip site navigation (1) Skip section navigation (2)

BUG #4764: error -7 in like translate

From: "Paulo Marques" <paulo(dot)dados(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4764: error -7 in like translate
Date: 2009-04-20 17:05:23
Message-ID: 200904201705.n3KH5N2m049204@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      4764
Logged by:          Paulo Marques
Email address:      paulo(dot)dados(at)gmail(dot)com
PostgreSQL version: 8.3
Operating system:   win server 2003
Description:        error -7 in like translate
Details: 

Select the following operating normally in previous versions and the Oracle,
but in version 8.3 always returns with error -7.
The error occurs just like in the upper (translate...
tanks

---------------------------------------

           EXEC SQL
            DECLARE CSR-CALENDARIO CURSOR FOR SELECT

                   "A"."ACA_CdCalend"
                  ,"A"."ALE_CdLetivo"
                  ,"A"."ACA_NmCalend"
                  ,"A"."ACA_DataInicio"
                  ,"A"."ACA_DataFim"
                  ,"B"."EMP_CdEmpresa"
                  ,"B"."ALE_CdLetivo"
                  ,"B"."ALE_Ano"
                  ,"B"."ALE_Periodo"
                  ,"B"."ALE_NmLetivo"
                  ,"B"."ALE_DataInicio"
                  ,"B"."ALE_DataFinal"

              FROM "aCALENDARIO" "A"
                  ,"aLETIVO" "B"

             WHERE ( "B"."EMP_CdEmpresa" = :aLETIVO-EMP-CdEmpresa )
               AND ( "A"."ALE_CdLetivo" = "B"."ALE_CdLetivo" )
               AND (

                    (
                        (UPPER(translate(btrim("A"."ACA_CdCalend"),
                        
'ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇKZYW',
                         'AAAAAEEEEIIIIOOOOOUUUUCCSIV')))
                        LIKE
                        (UPPER(translate(btrim(:DB-LIKE),
                       
'ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇKZYW',
                        'AAAAAEEEEIIIIOOOOOUUUUCCSIV')))
                    )

                    OR
                    (
                        (UPPER(translate(btrim("A"."ACA_NmCalend"),
                        
'ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇKZYW',
                         'AAAAAEEEEIIIIOOOOOUUUUCCSIV')))
                        LIKE
                        (UPPER(translate(btrim(:DB-LIKE),
                        
'ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇKZYW',
                         'AAAAAEEEEIIIIOOOOOUUUUCCSIV')))
                    )

                    OR
                    (
                        to_char("A"."ACA_DataInicio",'DD/MM/YYYY')
                        LIKE
                        btrim(:DB-LIKE)
                    )

                   )

             ORDER BY  "B"."ALE_Ano"
                      ,"B"."ALE_Periodo"
                      ,"A"."ACA_DataInicio"

               LIMIT :w-Limit

pgsql-bugs by date

Next:From: Scott WellsDate: 2009-04-20 18:08:56
Subject: Scripting issue
Previous:From: Magnus HaganderDate: 2009-04-20 15:24:13
Subject: Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group