Capital letters issue with 'like'

Hello
Maybe it is simple but I cant find solution for this.
For example I have table pets with column name
"name" | "category"
1. Tomcat | cat
2. tomy | cat
3. toM | cat
4. tim | cat
5. tOmi | cat
query
select name from pets where name like '%to%'
results will give me
2. tomy
3. toM
but i want as results all names wit 'to' no matter if it has capital letters or not
1. Tomcat
2. tomy
3. toM
5. tOmi
How should i write this query ?
please help

Hi,
Salski wrote:
but I also have to remember to convert entered string in inputtext to uppercase as well
someString.toUpperCase()You can also do that on the back-end, if that's better for you:
select  name
from    pets
where   UPPER (name) like '%' || UPPER (someString) || '%'
Thanks all for respondGlad to help!

Similar Messages

  • Issue with like operator

    Hi All,
    we are using like operator for search functionality (oracle 10G).
    could any one help me in handling null, when we use like operator.
    Ex:
    select empno,ename,d.deptno
    from emp e, dept d
    where e.deptno = d.deptno
    and e.ename like '%JO%';
    we have a text box in the front end to key in employee name (ename) or part of ename. when user doesnt use this option, he leaves it blank.
    so In the above query, if ename is null then my query fails.
    could anybody help me out in handling this scenario.
    My query should still give me all the employee ids, if the ename is blank.
    using dynamic sql is not advisable.
    Thanks
    Manju

    Something like this ->
    satyaki>select *
      2     from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.26
    satyaki>
    satyaki>
    satyaki>select *
      2  from emp
      3  where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename));
    Enter value for str:
    old   3: where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename))
    new   3: where upper(ename) like nvl('%'||upper('')||'%',upper(ename))
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>/
    Enter value for str: sa
    old   3: where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename))
    new   3: where upper(ename) like nvl('%'||upper('sa')||'%',upper(ename))
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
    Elapsed: 00:00:00.08Regards.
    Satyaki De.

  • Help with like in sql

    Hi all,
        I am having an issue with like statement with full text search
    My data : BEAN PEELER
     SQL STATEMENT:  Select * from table where col1 like '%[^a-z]peeler[^a-z]%' 
    doesn't give all the results which has peeler in it (for example the above example)
    instead if i use this statement
     Select * from table where col1 like '%peeler%' it returns all the rows.
    But, i need to check the exact word search and not subset of it.
    My problem is how is my query able to detect few rows which has peeler in it but not all?  please help

    so did you try this?
    declare @tab table(
    val varchar(50));
    insert into @tab values
    ('BEAN PEELER'),
    ('PEELERRRRR'),
    ('SOMPEERLER');
    Select * from @tab where val like 'peeler' or VAL like '% Peeler %' or val like '% Peeler'
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Issue with capital letters

    Hi folks!
    I usually make translations of video materials in my language (italian), so I usually open Word for Mac and Quick Time Pro together.
    Since I write these translations in capital letters, to make them easier to read by voice talents, I noticed that, in last Quick Time updates, with caps Lock inserted the transport keys J, K, L don't work, and the keys I and O (to loop a sequence) either.
    Have you ever heard about it?
    Is anybody able to suggest a work-out?
    Thanx in advance!

    Not really a workaround or a solution, but two things to consider...
    1) DOING SCRIPTS IN ALL CAPS IS AN ARCHAIC PRACTICE WHICH DATES BACK TO THE STONE AGES WHEN THE ONLY WAY TO GET LARGE TEXT WAS TO USE A PRIMARY TYPEWRITER WHICH WAS INCAPABLE OF PRODUCING LOWER CASE TEXT. I STILL DO NOT UNDERSTAND WHY MIXED CASE IN A LARGE FONT SIZE, WHICH IS ACTUALLY MUCH EASIER TO READ THAN ALL-CAPS, HAS STILL NOT BECOME THE WORLDWIDE STANDARD. THIS PARAGRAPH IS IN CAPS NOT BECAUSE I AM TRYING TO SHOUT, WHICH IS THE USUAL INTERPRETATION ON THE INTERNET, BUT TO DEMONSTRATE A POINT: READING THIS PARAGRAPH IS ACTUALLY MADE MORE DIFFICULT BECAUSE OF THE CAPS AS THEY OBSCURE THE SYMBOLS, THE SENTENCE ENDINGS, AND ANY OTHER METHODS WHICH MIGHT BE USEFUL FOR EMPHASIS.
    THAT SAID, IT MAY NOT REALLY BE YOUR CHOICE. OBVIOUSLY YOU HAVE TO LIVE WITH WHATEVER STANDARDS ARE ESTABLISHED BY YOUR CLIENT, EVEN IF THOSE STANDARDS DON'T REALLY MAKE SENSE.
    2) Have you considered getting yourself a Shuttle Express or Shuttle Pro controller? I'm trying to remember the manuf...I think it's Contour Design or something like that. Yeah, here it is: http://www.contourdesign.com It's a multimedia controller which plugs into the USB port and emulates a jog/shuttle control found on a professional VCR. The neat thing about it is that all of the buttons and functions are completely programmable, and you can even use it to fire off AppleScripts. I've got the Shuttle Express which has five buttons (the Shuttle Pro has "a whole bunch"), and the really cool thing about it is that because you can program it on a per-application basis or on a global basis. Even cooler is that the device focus does not necessarily follow the application focus, but it does follow the mouse pointer.
    (Okay, Dave, what the heck does all that mean?)
    What that means is that not only can you use it as a bi-directional jog/shuttle controller for QuickTime, not only can you program the buttons for, say, set-in, set-out, play-forward, loop, stop...but I'm pretty certain that you can set it up so that while you are TYPING MERRILY AWAY IN ALL CAPS IN MICROSOFT WEIRD, it can still control QuickTime Player *even though QuickTime Player is not the foreground application*.
    It isn't really a solution or a workaround to your problem, but it's a tool that might be beneficial to your workflow.
    Disclaimer: That's an unsolicited endorsement. I don't sell hardware, I have no connection whatsoever to Contour Design, and can't think of any possible way to benefit financially from giving this advice. I do own a Shuttle Express and think it's a cool little gadget.
    --Dave Althoff, Jr.

  • Script to replace small caps that are typed as capital letters with non-capital letters (A = a, B = b, etc...)

    I'm looking for a way to replace small caps that are typed as capitals by their normal equivalent.
    I've got a text that contains a lot of names which should all be set in small caps.
    In fact they are, but because capital letters are used for first letters they don't scale.
    Short: I would like to be able to look for A, B, C... (in small caps) and replace them with (a, b, c...) in small caps in one go.
    (compare two arrays?? -> is this possible in indesign scripting)

    Hi,
    Actually, it works only with OpenType fonts and - in this case - can be managed by UI find...change feature.
    With other type of font we need a real change of contents (another keyboard hit).
    It could be done with this code (activeDocument is a target):
    -- works for Open Type as well --
    // For Latin Basic (ASCII from 65 to 90)
    // changes a "cap" letter to a "small" letter
    // if Capitalization.SMALL_CAPS is applied to
    app.findGrepPreferences = app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat = "\\u";
    app.findGrepPreferences.capitalization = Capitalization.SMALL_CAPS;
    var
      mSTART = 65, // ASCII number for "A"
      Mstart = 97, // ASCII number for "a"
      mDiff = 0,
      mTarget = app.activeDocument,
      mFound = mTarget.findGrep(),
      len = mFound.length, cString;
    while (len-->0) {
      cString = mFound[len].contents;
      mDiff = cString.charCodeAt(0) - mSTART;
      if (mDiff > -1 && mDiff < 26)
      mFound[len].contents = String.fromCharCode( Mstart + mDiff );
    app.findGrepPreferences = app.findGrepPreferences = null;
    Jarek

  • HT4623 i have issue with my iphone5, the phone is open and good network signal, but when some one calling me they cant reach me, like the phone is off

    i have issue with my iphone5, the phone is open and good network signal, but when some one calling me they cant reach me, like the phone is off

    You are as far as you can be with the original iPad; only iPad 2 and greater will update to 7+

  • I bought a few songs on itunes but the songs appear in grey letters and I cannot transfer them to my iphone. I've bought/rented TV shows/movies since so there isn't an issue with my account. How can I get these newly purchased songs onto my iphone?

    I bought a few songs on itunes but the songs appear in grey letters and I cannot transfer them to my iphone. I've bought/rented TV shows/movies since so there isn't an issue with my account. How can I get these newly purchased songs onto my iphone?

    You made a purchase and exhausted the credit on your card before it processed. All purchases are final. Contact iTunes Store support. You need to settle up before you can purchase or download anything else.

  • Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

    Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

    Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

  • Can not take a screenshot with Maverick and track pad.  can not use apple chat to talk with a tech.  there are other issues also like I used to be able to go back a page with the delete button.  No Maverick PDF to instruct on how to use Maverick

    Can not take a screenshot with Maverick and track pad.  can not use apple chat to talk with a tech.  there are other issues also like I used to be able to go back a page with the delete button.  No Maverick PDF to instruct on how to use Maverick
    THE use of the apple support is a mess also.
    I want to be able to use my MAC fully and easily like I used to with Snow Leopard. 
    What is wrong with this maverick OS?

    The only people who can possibly assist you with this is Apple Customer Relations, call your local Apple contact number and ask for Customer Relations then explain your situation clearly and politely (be firm but don't rant).
    You might want to investiage what the local laws are regarding defective goods and 'fit for use' definitions on warranties etc. Consumer Protection can be a useful tool to use or bargain with if needed ...

  • I have CS2 and would like to do Image Stacking.    I understand CS3 allows this.  correct?     Am I wiser to purchase CS3 upgrade.  Am I going to run into issues with install?

    I have CS2 and would like to do Image Stacking.    I understand CS3 allows this.  correct?     Am I wiser to purchase CS3 upgrade.  Am I going to run into issues with install?

    Well, I refuse to sign up to pay Adobe a monthly tribute for life too, but that doesn't mean we are limited to CS3.
    I'm staying with CS6.
    Adobe still sells a perpetual-license to Photoshop CS6 without the subscription model, but it's $700 for the Standard version and a cool $1,000 for the Extended version.
    You haven't mentioned your platform, Macintosh or Windows, so make sure CS3 or any other obsolete version you buy actually runs on a modern operating system.
    Good luck.

  • Issue with format: date dd-MMM-yyyy - First letter lower instead of capital

    Hi colleagues,
    I am facing a problem using: <?format-date:FIELD_NAME;’dd-MMM-yyyy’;'UTC'?> on my RTF template.
    When the report run on English it retrieves: Apr, Jun, ...
    but in French it retrieves: apr, jun.
    The client wants the first letter of the month in capital letter I thought that MMM is the format to manage it...
    I am using XML Publisher with PeopleSoft.
    The template is in French and using bursting I create the report in different language depending on some parameters.
    When I preview the template everything is ok.
    Does anyone knows where is the Abbreviate Name of the Month comes from?
    Thanks in advance,
    Juan Diego

    Hi Juan
    It ought to be returning 'Arv' not 'apr' in French right?
    It might be an issue with the i18n library that is being shipped. I would suggest logging a service request with support for some help.
    Regards
    tim

  • Issue While executing the Query for Pagination using ROWNUM with like

    Issue While executing the Query for Pagination using ROWNUM with like.
    Database is Oracle11G.
    Oracle Database Table contains 8-9 lakh records
    1) SQL equal (=)
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE A.REFERENCE = 'KMF22600920'
    Execution Time:- 0.00869245 seconds
    Returns 2 resultsets
    2) SQL like (one %)
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE A.REFERENCE = 'KMF22600920%'
    Execution Time:- 0.01094301 seconds
    Returns 2 resultsets
    3) SQL like (two%)
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE A.REFERENCE like '%KMF22600920%'
    Execution Time:- 6.43989658 seconds
    Returns 2 resultsets
    In Pagination, we are using Modified version of SQL Query 3) with ROWNUM as mentioned below :-
    4) SELECT * FROM (
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE REFERENCE like '%KMF22600920%' AND ROWNUM <= 20 ) WHERE RNUM > 0
    Execution Time:- Infinite
    ResultSets:- No as execution time is infinite
    a) Instead of like if we use = in the above query it is returning the 2 resultsets (execution time 0.02699282 seconds)
    b) Instead of two % in the above query, if use one example REFERENCE like 'KMF22600920%' it is returning the 2 resultsets (execution time 0.03313019 seconds)
    Issue:- When using two % in like in the above query i.e. REFERENCE like '%KMF22600920%' AND ROWNUM <= 20 ) , it is going to infinite.
    Could you please let us know what is the issue with two % used in like and rownum
    5) Modified version of Option1 query (move out the RNUM condition AND RNUM <= 20)
    SELECT * FROM (
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE REFERENCE like '%KMF22600920%' ) WHERE RNUM > 0 AND RNUM <= 20
    Execution Time:- 7.41368914 seconds
    Returns 2 resultsets
    Is the above query is best optimized query which should be used for the Pagination or still can improve on this ?

    This would be easier to diagnose if there was an explain plan posted for the 'good' and 'bad' queries. Generally speaking using '%' on both sides precludes the use of any indexes.

  • Please enter at most 70 letters or numbers for street address, i am facing this issue with that i am unable to downloads few apps, as it is asking for this question and again and again,

    please enter at most 70 letters or numbers for street address, i am facing this issue with that i am unable to downloads few apps, as it is asking for this question and again and again,
    i tried all letters and address more 100 hundred also nut no of use,

    please enter at most 70 letters or numbers for street address, i am facing this issue with that i am unable to downloads few apps, as it is asking for this question and again and again,
    i tried all letters and address more 100 hundred also nut no of use,

  • Table entries only with capital letters

    Hi
    I have created a table with some entries.One of these is type char length 65.My problem appears when i try to add entries to my table in this field,it will automatically transform them in capital letters.Even if i write with small letters,when saving,it will save my text with capital letters.How can i change this?
    thank you.

    Hi Seba,
    Make below change in the DOMAIN for that field
    Domain
    Defination Tab
    Tick Lower Case Checkbox of Output Characteristics..
    Use
    When this attribute is activated, you can enter both upper and lower
    case letters; conversion to upper case does not then take place. Use of
    this attribute only makes sense with character formats.
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Spell Checking Text with All Capital Letters

    Is it possible to change a spell check option in Adobe, like you can in MS Word, to include words in all capital letters? we have thousnads of documents that require all text to be all capitals and spend an appreciable amount of time spell checking by copying to MS Word to discover errors. No one I've talked to seems to have an answer.

    As I understand it the spell check in Acrobat is for text in annotations only.
    It does not check PDF page content..
    Such content needs to be spell/grammer checked before converting to PDF.
    Be well...

Maybe you are looking for

  • Hooking laptop up to LCD HDTV

    What cord do I need to purchase to hookup my laptop to my TV to get both video and sound?  Any guidance is appreciated!

  • Quarterly Payments for Phone Number Charged in the...

    I used to live in Australia, where I had a Premium Account with SKYPE MANAGER and a US Skype Number billed in AUD.  I converted the Premium Account to USD and a USD Credit Card, and all "high-level" billings are working correctly.  However, when the

  • New version of Ses2sesx posted

    A new version of the donation-ware utility to convert legacy .ses session files to the new .sesx format has been posted over at AATranslator.com. Here's a PDF outlining the changes since the last version. Cheers, Chad

  • Apple Notes not sending notes to Gmail

    Previously when I created a note in Apple Notes, it would sync to my MacBook, iPad, iPhone and the new note would also be sent to my Gmail account. I've since upgraded to Mavericks on my MacBook on iOS 7 on my iOS devices. Notes are still syncing acr

  • Temporary Internet Files in Java Application

    Hello, I would like to know how to use "Temporary Internet Files" in a Java application. When I make a Java Applet that fetch some internet files and launch it from internet browsers, the fetched files are cached in "C:\Documents and Settings\***\App