Home » SQL & PL/SQL » SQL & PL/SQL » Use of UPPER function with wild cards
Use of UPPER function with wild cards [message #600457] Wed, 06 November 2013 23:03 Go to next message
newbieinapps
Messages: 13
Registered: August 2013
Junior Member
Hi Guys,

Do UPPER function works correct using wildcards?
Please refer to the 15,16,17 records from the screenshot.
Re: Use of UPPER function with wild cards [message #600458 is a reply to message #600457] Wed, 06 November 2013 23:19 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
OS name & version?
post complete results from SQL below

SELECT * FROM V$VERSION;

How can we reproduce what you report?
post CREATE TABLE & INSERT statements with example data

Re: Use of UPPER function with wild cards [message #600461 is a reply to message #600458] Wed, 06 November 2013 23:41 Go to previous messageGo to next message
newbieinapps
Messages: 13
Registered: August 2013
Junior Member
Version:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
"CORE 11.2.0.3.0 Production"
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

I already attached a screenshot.
Re: Use of UPPER function with wild cards [message #600465 is a reply to message #600461] Thu, 07 November 2013 00:27 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
newbieinapps wrote on Thu, 07 November 2013 05:41
Version:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
"CORE 11.2.0.3.0 Production"
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

I already attached a screenshot.
If you are too lazy to provide a test case, just give an example using the standard demo tables that everyone has, for instance,
orclz> select * from emp where upper(ename) like upper('%LL%');

     EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
---------- ---------- --------- ---------- ------------------- ---------- ---------- ----------
      7499 ALLEN      SALESMAN        7698 1981-02-20 00:00:00       1600        300         30
      7934 MILLER     CLERK           7782 1982-01-23 00:00:00       1300                    10

orclz>

Re: Use of UPPER function with wild cards [message #600470 is a reply to message #600465] Thu, 07 November 2013 01:59 Go to previous messageGo to next message
newbieinapps
Messages: 13
Registered: August 2013
Junior Member
CREATE TABLE XXTEST (NAME VARCHAR2(30), DESCRIPTION VARCHAR2(50));

insert into xxtest(name,description) values('AR','ESC Accounts Receivable IT Concurrent Processes');
insert into xxtest(name,description) values('AR','RSC IT Intransit Concurrent Processes');
insert into xxtest(name,description) values('AR','RSN IT Intransit Concurrent Processes');
insert into xxtest(name,description) values('AR','RSC Accounts Receivable IT Concurrent Processes');



SELECT * FROM XXTEST WHERE UPPER(description) LIKE UPPER('%IT Concurrent%');

Name    Description
------  ------------------------------------------------------
AR	ESC Accounts Receivable IT Concurrent Processes
AR	RSC IT Intransit Concurrent Processes
AR	RSN IT Intransit Concurrent Processes
AR	RSC Accounts Receivable IT Concurrent Processes


SELECT * FROM XXTEST WHERE description LIKE '%IT Concurrent%';

Name   Description
-----  -------------------------------------------------------
AR	ESC Accounts Receivable IT Concurrent Processes
AR	RSC Accounts Receivable IT Concurrent Processes


When I use upper function, wild card doesn't work
Re: Use of UPPER function with wild cards [message #600471 is a reply to message #600470] Thu, 07 November 2013 02:14 Go to previous message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Well. It works as expected. it finds "RSC IT Intransit Concurrent Processes"
Previous Topic: ORA-06508: PL/SQL: could not find program unit being called
Next Topic: How to allow only numbers where condition substr(Object_id,7,10)
Goto Forum:
  


Current Time: Fri Apr 19 20:38:30 CDT 2024