From: Dave Cramer <Dave@micro-automation.net>
To: Hale@halepringle.com
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Select * from users WHERE upper(lastName) =
Date: 11 Jan 2003 19:28:11 -0500
Message-ID: <1042331290.2327.6.camel@inspiron.cramers> (raw)
In-Reply-To: <HIEOJHJBFLIEMFCAOMOEIEMCCIAA.halepringle@yahoo.com>
References: <HIEOJHJBFLIEMFCAOMOEIEMCCIAA.halepringle@yahoo.com>
What does select * from ... where trim(upper(lastname)) ==
upper('Pringle') return?
Dave
On Fri, 2003-01-10 at 18:45, Hale Pringle wrote:
> 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?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
Dave Cramer <Dave@micro-automation.net>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: Dave@micro-automation.net, Hale@halepringle.com, pgsql-jdbc@postgresql.org
Subject: Re: Select * from users WHERE upper(lastName) =
In-Reply-To: <1042331290.2327.6.camel@inspiron.cramers>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox