SQL to do a like compare against two concatenated columns...

I'm trying to do a like search against two columns that house a first and last name, but people might touch like 'John Doe'
Can I do a like search against concatenated columns?
Kinda what I want to do ...
select * FROM worker_view WHERE
(LOWER(E.USUALFIRSTNAME) || ' ' || LOWER(E.LASTNAME)) LIKE '%searchstring%'
... but obviously this is not right ... any direction would be appreciated!

Let's take your example as test case
First name: John
Last name : Doe
Search string possibilities:
'John'
'Doe'
'John Doe'
'Doe John'SQL statement:
SELECT *
FROM   worker_view
WHERE  LOWER(E.USUALFIRSTNAME) LIKE LOWER('%searchstring%')
OR     LOWER(E.LASTNAME) LIKE LOWER('%searchstring%')
OR     LOWER(E.USUALFIRSTNAME) || ' ' || LOWER(E.LASTNAME) LOWER('%searchstring%')
OR     LOWER(E.LASTNAME) || ' ' || LOWER(E.USUALFIRSTNAME) LOWER('%searchstring%')Following would still fail:
'JohnDoe'
'DoeJohn'
'John  Doe'
'Doe  John'Hope that should be fine with your application.
- dkv

Similar Messages

  • How to compare between two versions of template project???

    Dear All,
    We are doing some cleanup activity in our solution manager system. For this actually we have created the replica of this project from production system to a sandbox system. We can do the cleanup of this project and can transport this new project to our production system and can move on.
    But the pbm we are facing now is, how do we bring in the data captured or added to the production system after we have copied it to the sandbox system?
    Can anybody throw in some light into this issue?
    We tried the option of creating different version for the template and using the sa_project_upgrade transaction to compare between two versions of the template using "Current Version in Project" option. Not sure whether this will work out.
    {{We thought that if we try in this way, we can find the difference between the two versions of the template project, and from there, might be we can bring in the new changes into our new project manually. We do agree that this is not the right approach.}}
    But the end result we got was like we got the information regarding where all there is the difference between the current version in the template project to that of the original(in our case it checked against BPR as we selected the scenarios from BPR for this template). But what we expected was a difference between two versions of the template.
    Pls help. Pls make a try to help. Any thoughts in this direction will help us to move forward.
    Any info will be suitably rewarded.
    best regards,
    Krishna.

    Hi Andreas,
    Thanks a lot for your immediate reply.
    I too had that doubt that my appraoch will not work. But wanted to get confirmation that it will not work. Also wanted to know about any other approach. Thank you for providing me with some alternative approach.
    I tried the option suggested by you. But while running the comparison report for the newly copied project with the option "New Version of Original", I am getting the below error. I do agree that this approach should work. But for some reason I am getting the below error. Can you pls look into the same and help me out.
    Internal error
    Message no. AI_COMPARE006
    Diagnosis
    An unexpected error has occurred in:
               program CL_SA_PROJECT_UPGRADE_ONLINE==CP
               include CL_SA_PROJECT_UPGRADE_ONLINE==CM002
               line                                                  102
    Procedure
    Restart the transaction. If the problem persists, check if a SAP note is existing for this problem. If not please send a message to the SAP hotline.
    Thanks a lot in advance.
    best regards,
    Krishna.

  • On Pages, let's say you have two similar documents, but you need to compare the two to see the differences.  Is there a way to do that?

    On Pages, let's say you have two similar documents. Two versions of the same document, but not merged in Cloud and saved as two separate files. B ut you need to compare the two to see the differences, some things on one, but not in the other.  In Word, they would merge the two and differences would be highlighted in red.  Is there a way to do something like that?

    Not actually in Pages, but there is third party software that purports to do this, google around.
    Peter

  • Project Documentation tab: can you 'freeze' a graph so another can be added and compared against?

    I've been using the Project Documentation view recently to quickly compare dc signals against changes that I make to an electrical system. What I'm trying to do is capture a few seconds of a DC signal, stop acquisition, make a change in the system, then capture a few more seconds of the same signal and compare the two.
    Project Documentation view is nice because I can drag the graphs onto the document for quick on the fly comparison.
    Problem is, I drag a acquired signal's graph onto the document expecting the waveform to 'freeze' so that I can capture another segment of data and drag that graph onto the document for comparison. But once I acquire this second burst of data the first graph captures the live waveform, overwriting the baseline waveform I'm trying to compare against.
    Is there a way to screencapture or freeze the graph so that multiple graphs can be stacked within the document form without them all updating?
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise

    Hi OKors,
    I’m not sure if you can do exactly what you want. If it were me, I would take the first reading, then save it to an LVM file, then take the second reading, store that to an LVM file, then load the files to compare.
    TimC
    National Instruments
    Applications Engineer

  • I would like to import two different cf cards from two different cameras into the same project/folder and have them be in order of the times they were taken, is there a trick?

    I would like to import two different cf cards from two different cameras into the same project/folder and have them be in the order of the times they were taken, any ideas on how to do this?

    Just import them normally and sort the project by date. They will fall into place. If you tried this and it isn;t happening then make sure the data and times on the two cameras are identical and make sure you are sorting by date and time and nothing else.

  • Can we implement the custom sql query in CR for joining the two tables

    Hi All,
    Is there anyway to implement the custom sql query in CR for joining the two tables?
    My requirement here is I need to write sql logics for joining the two tables...
    Thanks,
    Gana

    In the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
    Log on to your data source if necessary.
    Under your data source, double-click the Add Command node.
    In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
    For example:
    SELECT
        Customer.`Customer ID`,
        Customer.`Customer Name`,
        Customer.`Last Year's Sales`,
        Customer.`Region`,
        Customer.`Country`,
        Orders.`Order Amount`,
        Orders.`Customer ID`,
        Orders.`Order Date`
    FROM
        Customer Customer INNER JOIN Orders Orders ON
            Customer.`Customer ID` = Orders.`Customer ID`
    WHERE
        (Customer.`Country` = 'USA' OR
        Customer.`Country` = 'Canada') AND
        Customer.`Last Year's Sales` < 10000.
    ORDER BY
        Customer.`Country` ASC,
        Customer.`Region` ASC
    Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
    Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
    For more information about creating parameters, see To create a parameter for a command object.
    Click OK.
    You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
    Note:
    To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
    By default, your command is called Command. You can change its alias by selecting it and pressing F2.

  • I would like to zip two .Txt files in java

    hi all,
    i would like to zip two temporaray files(.Txt) in java

    Do you want to write a part of it yourself or do you want us to prepare you a complete solution? I provided you with a link to Java's zipping tutorial. If you took the effort to read it, you'll know there is an example zip.java.
    You can put the initialisation in your main, take what's in the for loop, put it into a function. I assume you can write a program that takes 2 command line parameters, and pass those params to your zip function and you've got it... That's how far I'll go for your solution!

  • I would simply like to insert two half-circles or half-moons in a Pages doc. There are no such graphics in the "shapes" area. So, ideas on how I can get those half-circles in my doc?

    I would simply like to insert two half-circles or half moons in a Pages doc. The current "shapes" does not include half-circles or half-moons. Ideally, I'd like to be able to apply my colour, lines, etc., etc to these half circles and size them. I am not a graphic artist.

    1. Go down to the bottom left corner of the window and increase the zoom to 400%
    2. Toolbar > Shapes > Circle
    3. Menu > Format > Make Editable > click on the bottom red dot > delete
    4. Click on the left side dot, there are two handles which pull out the curves.
    5. Drag down a guide from the ruler to the tip of the top of the handle.
    6. Click on the bottom handle tip and shift drag it up until it is tucked back into the red dot.
    7. Do the same to other corner.
    Now keep a copy of this in a document and copy paste where you need it.
    Peter

  • GTX 970 vs. 980 - do perf benchmarks exists comparing these two with all else being equal?

    Do stats exist comparing these two directly in APP (all else being equal)?
    Have a defective 970 and considering a 980, but wondering if it's worth the extra cost. In other words, does the extra cost yield significant real world performance gains in APP?

    I don't believe so, however the price difference is pretty big. Where I live it's around €350 for the 970, €450 for the 780 ti and €550 for the 980. It would seem that (at least for the time being) the 780 ti is on par if not slightly faster than the gtx 980. I am not entirely sure how much upcoming drivers and better future support for Maxwell might help it swing in favour for the 980, however I do believe the 970 to hit a solid sweet spot. It might depend on the rest of your system configuration, was the defective 970 DOA or did you manage to run it for a while to see if your setup managed to max out the gpu?
    Keep in mind if anyone reading this starts to consider choosing between the 780 ti that it does use more power and doesn't come with hdmi 2.0.

  • Hello! My name is Vadim. I'm from Russia. I'd like to buy two iPhones 5, 64 GB: for my wife and myself. But I have a question to you. Will it work in Russia? How much will it cost for me? And how much will delivery cost to Russia? Thank you very much.

    Dear Sir or Madame,
    My name is Vadim. I'm from Russia. I'd like to buy two iPhones 5, 64 GB online, from your official website Apple: for my wife and myself. But I've a question to you. Will it (iPhone 5, 64 GB) work in Russia? How much will they cost for me? And how much will the delivery from America to Russia cost?
    Yours sincerely,
    Vadim Fedotov.

    iPhone 5 is not available unlocked in US  and
    Apple Store online does not ship outside the Country it operates
    You are best served waiting for the iPhone 5 to be announced in Russia
    through your Apple Approved carriers

  • Recursive query for finding parents and children against two tables

    Hi I have two tables where the data is stored hierarchially.
    I have found using connect_by, level and other oracle functions doing its job when the data is in one table.
    Can I traverse against two tables by using the same oracle functions.
    My Table A can go 2 levels deep in my hierarchy and level 3 and so forth has to be done against a different table.
    Appreciate your insight..
    Thanks in advance

    The number of levels that I can traverse in the first table is dynamic (sometimes 2 levels and sometimes 3 levels and actually no level limit) and then has to dynamically start looking at second table for finding any more levels in the other table.
    I was able to implement them seperately and union them.
    I was more looking for a comprehensive solution to reduce the number of lines that I have to maintain...
    Thanks in advance
    Edited by: user566193 on Jan 15, 2010 1:58 PM

  • Hi in my sql query i applied like condition (like '%TEST') but it is taking long time

    Hi in my sql query i applied like condition (like '%TEST') but it is taking long time. I applied indexes also,but still i'm facing the same problem. In my databse nearly 2,00,000 records their.

    Hi Manikandan
    Is there a difference in performance between running the query in BEx and WebI?
    have you aggregates in place on the BEx side of things?
    When you say its taking too long to open the report, have you a variable screen coming up for the report and is that what is taking the time or is it the report execution.
    With regards
    Gill

  • Can i divide the page size like 50%where  two regions should appear

    Hai..
    Can i divide the page size like 50%where two regions should appear, and in another 50% one more reion should apper ...
    how can i do that
    Thanks
    Anoo

    Anoo,
    Are you talking about two regions side-by-side? You could try applying "Reports Region 100% Width" report template on both regions, and making the 2nd region having Column 2. This way both will display side-by-side with 100% width.
    Ittichai

  • How an i compare the two forms ( script) that are in two systems ?

    Hi,
    How can I compare the two forms(sap script)  which are in different versions  or systems? One form is in D22 and other form is P22 .
    My requirement is to change the form when they are different.
    Thanks,
    Suresh.

    Hi,
    You can download the form info for each script and compare these two files.
    In the SAPscript choose Utilities -> Form info and save this as a file.  As they are structured in the same format you can then look for differences in these files rather than having to look through the form window by window.
    Regards,
    Nick

  • I would like to make two separate ca

    I would like to make two separate Calendars in iCalendar.  Tried following directions on "help" but what I get is two calendars that are linked and the same.  How do I get two completely, independent calendars?  Thanks

    I have the same question.  Does anyone have a solution?

Maybe you are looking for