-
When to use UPPER and LOWER
Q: You want to display the details of all employees whose last name is Smith.
But you are not sure in which case last names are stored.
A: SELECT last name, first name FROM emp WHERE LOWER(last name) = ('smith')
Why is the answer not WHERE UPPER(last name) = ('smith')
I thought UPPER was insensitive to case?
This is a very basic question, so please help.
-
Re: When to use UPPER and LOWER
UPPER and LOWER change the string to be all upper case or all lower case
respectively. In other words, UPPER(last name) could never equal 'smith',
since it would have converted the string to upper case (SMITH)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
"Auseve" <wdesern@triad.rr.com> wrote in message
news:3c99072f$1@10.1.10.29...
>
> Q: You want to display the details of all employees whose last name is
Smith.
> But you are not sure in which case last names are stored.
>
> A: SELECT last name, first name FROM emp WHERE LOWER(last name) =
('smith')
>
> Why is the answer not WHERE UPPER(last name) = ('smith')
> I thought UPPER was insensitive to case?
>
> This is a very basic question, so please help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks