resultset not case-sensitive [message #371678] |
Fri, 24 November 2000 05:16 |
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 |
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 :)
|
|
|
|
|
|
|
|