Home » RDBMS Server » Server Administration » resultset not case-sensitive
resultset not case-sensitive [message #371678] Fri, 24 November 2000 05:16 Go to next message
Peter Engelenburg
Messages: 2
Registered: November 2000
Junior Member
Is there a way to show resultsets of an sql-select statement without being case-sensitive?
The solution can't be build into the select-statement, because this statement is automatically generated !! I was hoping there is a setting that can make this come true for specified tables....! (help..)

Thanks in advance,

Peter Engelenburg
Client-Solutions
Re: resultset not case-sensitive [message #371685 is a reply to message #371678] Fri, 24 November 2000 10:59 Go to previous messageGo to next message
Prem
Messages: 79
Registered: August 1998
Member
Peter,

When you say the resultset should be case insensitive, what exactly do you mean? Is it something where the enters some search criteria and you need to search for that string and ignore case. if this is the case, then convert both the left hand side and the right hand side of the where condition to upper(). For e.g. if the user is searching for a book and types "lee Child" into the PAUTHOR field instead of "Lee Child",
in your where clause, you can say
select....
from...
where UPPER(AUTHOR) = UPPER(PAUTHOR)
The above can be used for a case insensitive exact match. If you dont want an exact match, then

select....
from...
where UPPER(AUTHOR) like '%'||UPPER(PAUTHOR)||'%';

if i m talking about something entirely different, then forget this reply :)

hth

Prem :)
Re: resultset not case-sensitive [message #371730 is a reply to message #371685] Thu, 30 November 2000 06:22 Go to previous messageGo to next message
Peter Engelenburg
Messages: 2
Registered: November 2000
Junior Member
What i was hoping for is that there is a setting in Oracle that makes is posible to create the following resultset from an sql-select:

AAAAA
aaaaa
BBBBB
bbbbb

instead of
AAAAA
BBBBB
aaaaa
bbbbb
Re: resultset not case-sensitive [message #371731 is a reply to message #371685] Thu, 30 November 2000 06:27 Go to previous messageGo to next message
Marcus Fernando
Messages: 34
Registered: September 2000
Member
Try to use in the ORDER BY clause UPPER(field).
Re: resultset not case-sensitive [message #371732 is a reply to message #371685] Thu, 30 November 2000 06:28 Go to previous messageGo to next message
Marcus Fernando
Messages: 34
Registered: September 2000
Member
Try to use in the ORDER BY clause UPPER(field).
Re: resultset not case-sensitive [message #371733 is a reply to message #371685] Thu, 30 November 2000 06:28 Go to previous messageGo to next message
Marcus Fernando
Messages: 34
Registered: September 2000
Member
Try to use in the ORDER BY clause UPPER(field).
Re: resultset not case-sensitive [message #371734 is a reply to message #371685] Thu, 30 November 2000 06:29 Go to previous message
Marcus Fernando
Messages: 34
Registered: September 2000
Member
Try to use in the ORDER BY clause UPPER(field).
Previous Topic: Help:how to create the special view below?
Next Topic: Remove Directories in Oracle8i Trigger
Goto Forum:
  


Current Time: Fri May 03 01:11:30 CDT 2024