Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: What is the difference between UPPER and NLS_UPPER when applied to "normal" characters

Re: What is the difference between UPPER and NLS_UPPER when applied to "normal" characters

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/10/11
Message-ID: <343fd5df.10414704@www.sigov.si>#1/1

The problem is not in using the NLS_UPPER function!

The reason why Michael's query did not return any row is because his column TBL.FLD is of type CHAR(30), so every value in this column is right-padded with blanks to the length of 30. So, neither his first or his second query can return any row, no matter if he uses UPPER or NLS_UPPER function.

When I tested his example for my previous post I created my table with column of type varchar2(30), and that is why the query returned the expected result.

On Fri, 10 Oct 1997 09:47:03 GMT, jurij.modic_at_mf.sigov.mail.si (Jurij Modic) wrote:

>On Thu, 09 Oct 1997 10:29:48 -0400, "Michael G. Schneider"
><mgs_software_at_compuserve.com> wrote:
>
>>What is the difference between UPPER and NLS_UPPER when applied to "normal"
>>characters. Have a look at the following lines.
>>
>> CREATE TABLE tbl (fld CHAR(30));
>> INSERT INTO tbl VALUES ('abc');
>>
>> SELECT fld FROM tbl
>> WHERE UPPER(fld) = UPPER('abc');
>>
>> SELECT fld FROM tbl
>> WHERE NLS_UPPER(fld,'NLS_SORT=German') =
>>NLS_UPPER('abc','NLS_SORT=German');
>>
>>I thought, both selects would bring back the same resultset. However, the
>>second select won't return anything at all.


Jurij Modic                             Republic of Slovenia
jurij.modic_at_mf.sigov.mail.si		Ministry of Finance
============================================================
The above opinions are mine and do not represent any official standpoints of my employer Received on Sat Oct 11 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US