Re: SUBSTR question

From: Michael Moore <michaeljmoore_at_gmail.com>
Date: Fri, 27 Feb 2009 13:36:18 -0800
Message-ID: <26fdee6e0902271336x2a1c138bsa7d75e2752cbc205_at_mail.gmail.com>



what does
select lastname,dbo.GSTRANSLATE(LASTNAME) rslt from dbo.constituents where dbo.GSTRANSLATE(LASTNAME) = 'PENA';

give?

On Fri, Feb 27, 2009 at 12:23 PM, Michael Schmitt <mschmitt_at_uchicago.edu>wrote:

> Hi All,
>
>
>
> We are having an issue were the SUBSTR function is used and returns 1 row
> less than expected. The select statement that the application runs uses a
> translate function and SUBSTR. You can see the results of the queries
> below. Can anyone explain why the SUBSTRB (or lack of SUBSTR) returns the 2
> rows that we expect, while SUBSTR returns only the 1 row? This is for a
> 9207 database. I know when the database was created it was created with
> CHARACTER SET WE8MSWIN1252, which I am guessing is related.
>
>
>
> Thanks,
>
> Mike
>
>
>
> SQL> select lastname from dbo.constituents where dbo.GSTRANSLATE(LASTNAME)
> = 'PENA';
>
> LASTNAME
>
> --------------------
>
> Pena
>
> Peņa
>
>
>
> SQL> select lastname from dbo.constituents where
> SUBSTR(dbo.GSTRANSLATE(LastName), 1, 3200) = 'PENA';
>
> LASTNAME
>
> --------------------
>
> Pena
>
>
>
> SQL> select lastname from dbo.constituents where
> SUBSTRB(dbo.GSTRANSLATE(LastName), 1, 3200) = 'PENA';
>
> LASTNAME
>
> ----------------------------
>
> Pena
>
> Peņa
>
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 27 2009 - 15:36:18 CST

Original text of this message