Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BC71A475DB3 for ; Fri, 10 Jan 2003 18:31:34 -0500 (EST) Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by postgresql.org (Postfix) with ESMTP id 57171475D91 for ; Fri, 10 Jan 2003 18:31:34 -0500 (EST) Received: from user168.net336.fl.sprint-hsd.net ([65.40.21.168] helo=haledesktop) by harrier.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 18X8ci-0006we-00 for pgsql-jdbc@postgresql.org; Fri, 10 Jan 2003 15:31:36 -0800 Reply-To: From: "Hale Pringle" To: Subject: Select * from users WHERE upper(lastName) = upper('Pringle') Date: Fri, 10 Jan 2003 18:45:43 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <3E10825A.9000608@meinl.bnv-bamberg.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/127 X-Sequence-Number: 5977 I have notices that when you want to use the upper() function, you must also use the trim(). For example, In a situation where a column names lastname is char(40): SELECT * FROM users WHERE lastname = 'Pringle' returns one row. SELECT * FROM users WHERE UPPER(lastname) = UPPER('Pringle') will return zero rows. SELECT * FROM users WHERE TRIM(UPPER(lastname) = TRIM(UPPER('Pringle')) will return one row. This seems odd to me. Can someone explain?