Multiple like patterns

what should be the SQL statement for multiple 'LIKE' patterns. I am giving the statement like this on a dummy 'EMP' table.
SELECT * FROM EMP WHERE ENAME LIKE 'JOHN%' OR ENAME LIKE 'PETER%'
Is the above statement correct for multipe patterns which is using 'OR' statement for pattern matching. Please help in solving my doubt as i need it resolved urgently.
Regards

Upper, lower case in Ename ????
Try :
SELECT * FROM EMP WHERE Upper( ENAME ) LIKE 'JOHN%' OR Upper( ENAME ) LIKE 'PETER%'

Similar Messages

  • Multiple like statements in a query

    Hi,
    I wonder if it's possible to have multiple like statements in a query.
    suppose instead of
    select * from someTable where remarks like '%ab%'
    I want to search for many string patterns such as '%edi%' '%odi%' '%di%' '%gf%' '%od%' '%podi%' etc. in one query.
    BTW, the table contains many millions of records.
    Regards
    Crusoe
    Edited by: Crusoe on 19-Jan-2009 00:25

    Crusoe wrote:
    This regexp_like function does not work with the development server to which I have rights to create tables etc. I guess it only works in 10g or greater. However i tried a quick test in the production server and it worked. It returned rows where the values between the | characters were found anywhere in the field ( I must learn this regex syntax sometime). Yes, regular expressions are 10g upwards. (You really should have your development server reflect your production server)
    There was a thread a while back giving an introduction to regular expressions...
    Introduction to regular expressions ...

  • Desktop appearance problem:  For no apparent reason my Mac running OSX 10.4.11 imposed a mesh-like pattern over the folders on my desktop and also across the top of the screen and down the right-hand side where I have the dock.  How do I remove it?

    For no apparent reason my Mac (2 GHz PowerPC G5) running 10.4.11 has put a mesh-like pattern over the folders on my desktop and also a band of the same pattern across the top of the screen and down the right-hand side over the dock.  (See screen grabs below.)
    It doesn't affect any operations but makes folder names and drop-down menus difficult to read through the pattern.
    I'm not aware of changing any settings so suspect I must have clicked on something without noticing.  How do I get rid of the overlaid pattern, please?

    Information about my computer is as follows:
    Machine Name:          iMac G5
    Machine Model:          PowerMac8,2
    CPU Type:          PowerPC G5  (3.1)
    Number Of CPUs:          1
    CPU Speed:          2 GHz
    L2 Cache (per CPU):          512 KB
    Memory:          1 GB
    Bus Speed:          667 MHz
    Boot ROM Version:          5.2.5f1
    It looks like this at the back:

  • OBIEE 11G : Remove label (is like pattern match) in the prompt

    Hi Experts,
    I have Gone through this thread Re: OBIEE 11G : Remove label (is like pattern match) in the prompt and applied JS as mentioed but
    It works for the first display of the page but its back as soon as you hit the apply button
    can be it be removed permanently? Thanks in Advance

    Hi Nagen,
    You can try the following:
    Create a variable prompt with the column vales that you want to match
    Create a filter in the analysis criteria tab on the column, set to pick up the variable, and define the IS LIKE here.
    It is effectively doing the same task as the standard prompt approach does, but in a round-a-bout way which doesn't include adding any of Oracle's text in.

  • I am getting a grid like pattern over solid colors durring a disolve

    I recently upgraded to Studio. When a sequence dissolves, especially to white, I am seeing a grid like pattern. I have also noticed this pattern in shots where there is a solid color in one location for a period of time. Any ideas?
    G5   Mac OS X (10.4.9)  

    Check your view options in the canvas or viewer pulldown menu (little radio button looks like a pill in the top center-right or either window.) Sounds like you have your background set to checkerboard 1 or 2. That grid is telling you there is nothing to be seen here. Set it to black if you want it black. This won't take away the fact that there is transparency mind you, it just shows transparency as black. You can choose white, as well.

  • Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns

    Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns
    Hi!
    I've tried to modify the example of  "multiple geometric patterns matching" , and just use two patterns, but when I run the VI this error appear and I doon't know how to solve it! , the error appears in the "IMAQ Learn multiple geometric patterns" block.
    Running on:
    - labview 32 bits
    - windows 7 64 bits
    - usb camera 2.0
    Any sugestion would be helpful..... !  Regards
    Attachments:
    template_12.png ‏150 KB
    template_11.png ‏123 KB
    vision_multiple_pattern_matching.vi ‏127 KB

    thanks all for your replies, the problem was on my template images, I had to give them information about the pattern matching, and I did it with NI Vision Template Editor, within Vision utilities, and I chose template with Feature Based. 
    Thank you again and Regards!

  • Datapump Export - multiple EXCLUDE patterns for TABLE

    I'm performing an export and I have two classes of tables (as in LIKE filters) that I wish to exclude. I've tried using multiple LIKE statements:
    EXCLUDE=TABLE:"LIKE 'FILTER1%'"
    EXCLUDE=TABLE:"LIKE 'FILTER2%'"
    However this way it appears the second EXCLUDE overwrites the first and only tables matching FILTER2% are excluded.
    Doing it like this has the same behavior and only tables matching FILTER2 are excluded
    EXCLUDE=TABLE:"LIKE 'FILTER1%'",TABLE:"LIKE 'FILTER2%'"
    The following are not syntactically correct but seemed worth trying
    EXCLUDE=TABLE:"LIKE 'FILTER1%' OR 'FILTER2%'"
    EXCLUDE=TABLE:"LIKE 'FILTER1%' OR LIKE 'FILTER2%'"
    Is there any way to accomplish what I'm trying to do here? This is 10.2.0.2.
    Thanks

    Hi,
    I can figure out a way for export, but not for import. If this is a user doing it's own tables, then you could use this
    exclude=table:'IN(select table_name from user_tables where table_name like ''TAB1%'' OR TABLE_NAME LIKE ''TAB2%'';
    If you are doing this for multiple schemas, then you need to use something like:
    exclude=table:'IN(select table_name from dba_tables where table_name like ''TAB1%'' OR TABLE_NAME LIKE ''TAB2%'';
    This does not work for import since chances are, the tables don't exist, so the query will return no rows found.
    Dean

  • LaserJet CP1525n – white crack-like patterns on black with new cartridge

    Greetings.
    I have installed a new black cartridge (CE320A) into my LaserJet CP1525n color printer.
    To test it, I printed a completely black page and this is what i got:
    http://i.imgur.com/HcdwOAb.jpg 
    As you can see, first of all, there are noticeable lines throughout the sheet,
    but then there is also this crack/scratch-like pattern reoccuring at even distance.
    Can I do anything to fix this defect in the cartridge or will I have to buy a new one?

    Hi @Fureon,
    Welcome to the HP Forums!
    I see that you are getting crack/scratch-like pattern on black with your HP LaserJet CP1525n. I am happy to look into this for you!
    Please take a look through this print quality guide. Resolving Print Quality Issues. If this guide does not resolve your issue, please call our phone support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. Country-language selector.
    Hope this helps, and have a nice day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • File dialog with multiple custom patterns

    I am in need of being able to user select multple file patterns (*.bin, *.exe...) in a file dialosg similar to the express File Dialog VI where it lists the directory and allows the user to select multiple files from a windows dir listing.  The express VI has a patterns input that takes  multiple patterns separated by a semimcolon but there appears to not be a way of providing a ring control for file type and letting the user select the pattern that he wants to filter the directory listing with.  I.E> > If the user wants to only load files that are *.bin, he only wants to view them in the listing.  How can I do this without mutliple dialog boxes?
    Solved!
    Go to Solution.

    Off-the-shelf might be something like a list box that allows multiple selections.  Or you could drop a cluster of booleans on the FP and parse the selected file types and place ;'s between them.  You could have multiple string controls that the user inputs the file extension and then you programmatically insert a ; I can't think of something off-the-shelf that easily does what you are looking for, these suggestions require a little bit of programming but should get you off to a good start at least.
    This is the approach for choosing any desired types from a list.  If you want to choose only one, use a ring or combo box or enum...  Much simpler when only choosing one of many.
    Nathan - Certified LabVIEW Developer

  • Multiple IDOCs pattern not working

    Hello, When I tried Multiple IDOC to single file pattern, it is not working as expected. Everytime when a idoc reaches XI, it is going to a seperate BPM queue and not collecting the IDOCs, any idea??

    Yes, I have refered. I have done exaclty the same thing as in SAP Pattern for collecting multiple idocs to single file. Everything is working fine in BPM too.  But the problem is whenever the idoc hits XI, it is going to a seperate BPM queue instead of a same queue. So single message for each BPM and BPM waits for 3 minutes (mentioned in BPM) and times out. But my need is all the IDOCs should come to a single BPM queue and BPM needs to collect all the IDOCs and send it as a single file.

  • Multiple sequential pattern match in a HSDIO acquisition app

    I am quite a newbie about HSDIO apps and I would like to implement a
    start-triggered app via Pattern Match. I wonder if I could recognize a
    sequence of pattern matches (various samples) in order to start a
    generation.
    I use a NI-6541 device.
    Thanks a lot.

    Hello Matt,
    Well, I'm sorry for the fact of being confusing. I'll try to clarify:
    > ... Are you saying that you want to acquire on one port and then
    > generate data on another port based on matching a pattern on the
    > acquisition? ...
    Yes, this is what I want to do. Also, sample clock is a external
    signal (20MHz) connected to 'STROBE' pin. Generation and acquisition
    sessions both use the same sample clock. Acquisition port has 2 lines/
    inputs (dio28, dio29) and generation one has 28 outputs
    (dio0..dio27).
    Well, I have to do the following process (let's cross fingers):
    1. When one '0' is detected in dio28 line, then device must wait until
    dio28 is '1' and dio29 is '1'. There's no generation between these
    events.
    2. After that, a generation of a certain waveform is performed at
    once, up to a certain number of samples in lines <dio0..dio27>. then,
    dio29 is '0'.
    3. Finally, pseudocoded: 'wait until dio28=1 and dio29=1. Then, go to
    step 2 with another waveform parttern.' Device ends when 288 diferent
    waveforms are written.
    > ... I also wanted to know what version of the NI-6541 you are using? PCI or
    > PXI? ...
    PXI.
    I hope to be more accurate.
    Many Thanks In Advance

  • Cm:select performance problem with multiple likes query clause

    I have query like <br>
              <b>listItem like '*abc.xml*' && serviceId like '*xyz.xml*'</b><br>
              Can we have two likes clauses mentioned above in the cm:select. The above is executing successfully but takes too much time to process. <br><br>
              Can we simplify the above mentioned query or any solution. Please help me in this issue.<br><br>
              Thanks & Regards,<br>
              Murthy Nalluri

    A few notes:
    1. You seem to have either a VPD policy active or you're using views that add some more predicates to the query, according to the plan posted (the access on the PK_OPERATOR_GROUP index). Could this make any difference?
    2. The estimates of the optimizer are really very accurate - actually astonishing - compared to the tkprof output, so the optimizer seems to have a very good picture of the cardinalities and therefore the plan should be reasonable.
    3. Did you gather index statistics as well (using COMPUTE STATISTICS when creating the index or "cascade=>true" option) when gathering the statistics? I assume you're on 9i, not 10g according to the plan and tkprof output.
    4. Looking at the amount of data that needs to be processed it is unlikely that this query takes only 3 seconds, the 20 seconds seems to be OK.
    If you are sure that for a similar amount of underlying data the query took only 3 seconds in the past it would be very useful if you - by any chance - have an execution plan at hand of that "3 seconds" execution.
    One thing that I could imagine is that due to the monthly data growth that you've mentioned one or more of the tables have exceeded the "2% of the buffer cache" threshold and therefore are no longer treated as "small tables" in the buffer cache. This could explain that you now have more physical reads than in the past and therefore the query takes longer to execute than before.
    I think that this query could only be executed in 3 seconds if it is somewhere using a predicate that is more selective and could benefit from an indexed access path.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to add multiple like/unlike buttons and users comments?

    I want to create a horizontal scrolling website with a set of images, like a film strip.
    Under each image I want the user to input a comment and click like/unlike under each photo.
    I want that all users see others' comments and the like/unlike counter under each image.
    I do not know coding and I need this for a school project.
    Thanks

    It's probably easier to use a wordpress blog setup and a plugin.  You could avoid all the coding issues.  You could take a look at my blog
    here at Best Biometric Gun Safe I did this blog completely through wordpress and avoided all coding issues.  Hope this helps and good luck.

  • Use multiple ui pattern together

    Hi
    I want to use Object List and Property Editor ui patterns together in my CAF application. How can I use these two ui patterns in my one interface.

    Hello,
    please check out the following tutorial:<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/655b5fda-0c01-0010-32b4-af13ffe4f96e">Property UI pattern</a>
    It explains the use of a property editor pattern with an object editor pattern. It doesn't show directly the combination of the object list with the property editor pattern - however it shows the principle and with the help of this principle it should be possible to combine the object list with the property editor UI.
    Furthermore you find here another example for the combination of different UI patterns: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/dabdb3ea-0c01-0010-df8f-ffd2755c74c5">Using KM with UI patterns</a> (just ignore the KM part of this tutoral).
    Regards,
      Jan

  • Search with multiple "like" strings

    Hello!
    I have a search form (table based on pl/sql block) with 3 textfields to insert search terms.
    I want to perform queries like in google, for example:
    Term1: Oracle
    Term2: Mangold
    Term3: SQL
    The result table should show ALL rows containing Term1 AND Term2 AND Term3
    My code gives me all rows containing Term1 OR Term2 OR Term3...
    Here is what I did so far...
    (textfields are named t1, t2, t3, search destination field is named x)
    select ...
    from ...
    where UPPER(x) like '%' || upper(:t1) || '%' and UPPER(x) like '%' || upper(:t2) and UPPER(x) like '%' || upper(:t2)
    My code is:
    BEGIN
    q:='select ' ||
    't.TAPES_PK,' ||
    't.PROJECT_FK,' ||
    'substr(t.TAPE_TITLE, 1, 40) TAPE_TITLE,' ||
    't.TAPE_NO,' ||
    't.LOCATION_FK,' ||
    't.LOCATION_TITLE,' ||
    't.SHOT_DATE,' ||
    'substr(t.TAPE_DESCRIPTION, 1, 30) TAPE_DESCRIPTION,' ||
    't.VIDEO_FORMAT,' ||
    't.CLIPSCOUNT, ' ||
    'TM_GET_FILENAME_FROM_PK(t."TAPES_PK") FILENAME ';
    f:='from "#OWNER#"."TM_VIEW_TAPE_LIST" t where 1=1 ';
    if :P201_SEARCH_STRING is not null then
    wstring:='and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING) || '%'' ';
    end if;
    if :P201_SEARCH_STRING1 is not null then
    wstring:='and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING1) || '%'' ';
    end if;
    if :P201_SEARCH_STRING2 is not null then
    wstring:='and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING2) || '%'' ';
    end if;
    if :P201_SEARCH_SHOT_DATE is not null then
    wshot:=' and SHOT_DATE=to_date(''' ||
         :P201_SEARCH_SHOT_DATE || ''' , ''DD.MM.YYYY'') ';
    end if;
    if :P201_SEARCH_TAPE_NO is not null then
    wno:=' and TAPE_NO = :P201_SEARCH_TAPE_NO ';
    end if;
    if :P201_SEARCH_LOCATION <> -1 then
    wloc:=' and LOCATION_FK = :P201_SEARCH_LOCATION';
    end if;
    q:=q || f || wstring || wshot || wno || wloc;
    RETURN q;
    END;
    Thanks a lot
    Johann

    Shouldn't your code be:
    wstring := '';
    f :P201_SEARCH_STRING is not null then
    wstring:=wstring || " and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING) || '%'' ';
    end if;
    if :P201_SEARCH_STRING1 is not null then
    wstring:=wstring || " and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING1) || '%'' ';
    end if;
    if :P201_SEARCH_STRING2 is not null then
    wstring:=wstring || " and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING2) || '%'' ';
    end if;
    Andy

Maybe you are looking for