More delicate search capabilities...or advanced search that is!

First, my personal header for most messages I post here:
"I am not a programmer, I know little about sql programming but I´m passionate about it, so I can learn if explained patiently".
And now to the message:
There´s a table. It´s called "tasks". Now, there´s a search field in which I can typically search in any field of that table. But here´s the thing: my users need to perform more specific searches, meaning advanced ones.
I have created a page with my top 10 forms refering to the 10 most common attributes my users like to filter by, such as: task responsible, due date, status, etc. Each field in this form has a value of course (PX_ID, PX_Status, etc). It has a "go" button and that´s it!
I realised I have to write a query from scratch if I want to use those variables to build a report, and here´s the thing: I managed to do it if, and only of my user completes every search field. When one of them is not completed the result is always "nothing". If the user completes only 1 field, and not the others...he sees nothing!
Of course this version of advanced search easy, just write down the conditions and you´re set! The thing is, and here´s where my knowledge of PL/SQL is not nearly enough to try to figure it out: how do I make this form work, regardless of what the user puts in any field? I mean: how do I make the search work with only the fields completed by the user, without caring that there might be fields empty?
I was tipped to "left join" and "if", but it beats me :)
Help pls?
Thanks!
Alejandro
And here comes the footer in case you didnt read the header:
"I am not a programmer, I know little about sql programming but I´m passionate about it, so I can learn if explained patiently".

Alejandro,
As one option...
If your table is called PEOPLE and has columns: first_name, surname, email_address etc.. and you have page items like PX_FIRST_NAME, PX_SURNAME, PX_EMAIL_ADDRESS where the user can type in what they want to search for, then your SQL query could be something like the following:
SELECT * FROM PERSONS
WHERE
(:PX_FIRST_NAME is null
OR
first_name like :PX_FIRST_NAME)
AND
(:PX_SURNAME is null
OR
SURNAME like :PX_SURNAME)
AND
(:PX_EMAIL_ADDRESS is null
OR
email_address like :PX_EMAIL_ADDRESS)
This way it will not matter if a user leaves one or more search criteria items empty.
Andy

Similar Messages

  • When we type a search item in firefox on my laptop then it shows the result then on second or third or more new search that is typing a new search it sticks to the first searched item

    when we type a search item in firefox on my laptop then it shows the result then on second or third or more new search that is typing a new search it sticks to the first searched one

    Tried that. Also tried SUPERAntiSpyware, ccleaner, HitmanPro. Removed anything that was reported. Problem persists.
    Chrome is also affected. But couldn't find any alternative way of not having Ask.com loaded as did in Firefox.
    Internet Explorer was initially affected. After the Ask.com search engine is removed that problem appears to have gone away.
    12/9/2014
    Interestingly, yesterday afternoon the Chrome browner new tab no longer hijacked by Ask.com. The symptom was there in the morning and had gone away in the late afternoon. Nothing was done except a few days ago I blocked everything on that page. The problem with Firefox continue to persist I didn't do the same blocking on it. I am going to try the same and then use anti-spyware to clear away all cookies and see what happens.

  • Safari 5.0.2 doesn't save any more google search results in the history.

    Hello together,
    Safari doesn't save any more google search results in the history.
    Steps to reproduce:
    1.) go to google.com
    2.) search for "APPLE"
    3.) open the history
    Result: the search for "APPLE" is not saved - only the Google mainpage.
    This has something to do with the new search string in the Location bar. Safari does not save URL with /#.
    For example:
    the new string is http://www.google.de/#hl=...
    the old one is: http://www.google.de/search?hl=....
    The change must something to do with the new Google-Search-Feature. When I deactivate it, then google works with the old string and I found the searches in the history.
    The second negative effect is, when you type "apple" into the location bar (after a search), the autocomplete shows the search result, but when you hit enter, you are redirected to the Google-Mainpage.
    Very annoying
    Can somebody confirm.
    Thanks
    Message was edited by: memo_78

    Thanks for your reply!
    Could you post the bug here, too, please:
    http://www.apple.com/feedback/safari.html
    I have done it
    Thanks in advance !
    memo

  • Hello I am in Afghanistan i searched that in realtek but that told me you coulde not use this sit   I writ again my problem    i installed win 7 32 bit in my mac pro 13-inch, Late 2011  Processor  2.4 GHz Intel Core i5

    On Thu, Jun 14, 2012 at 12:54 PM, mahdi ehsani <[email protected]> wrote:
    On Sun, Jun 10, 2012 at 7:29 PM, Apple Support Communities Updates <[email protected]> wrote:
    Apple Support Communities
    Re: after install windows 7 32 bit there is no sound my mac is os x 10.7.2
    created by The hatter in Boot Camp - View the full discussion
    This solved my question 
    This helped me
    you have RealTek on your workstation and just download the current driver which is easy to findwww.realtek.com
    This solved my question 
    This helped me
    Did this help? Go to the message, sign in, and reply or mark the response as correct or helpful
    Start a new discussion in the same community/choose-container!input.jspa?contentType=1&containerType=14&container=2143&ac_ci d=op123456
    You are receiving this email from Apple Support Communities. You can change your email preferences in your Apple Support Communities Profile.
    © 2012 Apple Inc. 1 Infinite Loop, MS 303-3DM, Cupertino, CA 95014.
    All Rights Reserved | Privacy Policy | Apple Support Communities Terms of Use | Apple Support
    hello I am in Afghanistan i searched that in realtek but that told me you coulde not use this sit 
    I writ again my problem  
    i installed win 7 32 bit in my mac pro 13-inch, Late 2011  Processor  2.4 GHz Intel Core i5   Software  Mac OS X Lion 10.7.2 (11C74) 
    but there is no sound in windows 7  please send me a address sit for downoad driver that i can use in Afghanistan 
    believe it is confus me and other friend that bought 5 mac's that are the same and i serched a lot of site without result
    please help us by address site please please .....
    <Edited by Host>

    hello I am in Afghanistan i searched that in realtek but that told me you coulde not use this sit
    I writ again my problem 
    i installed win 7 32 bit in my mac pro 13-inch, Late 2011  Processor  2.4 GHz Intel Core i5   Software  Mac OS X Lion 10.7.2 (11C74)
    but there is no sound in windows 7  please send me a address sit for downoad driver that i can use in Afghanistan
    believe it is confus me and other friend that bought 5 mac's that are the same and i serched a lot of site without result

  • How do I get rid of "Yahoo! Search - Web Search" that comes up every time I click on a new tab?

    How do I get rid of "Yahoo! Search - Web Search" that comes up in address bar every time I click on a new tab? I have to delete it in order to go to the site I want. Very annoying. I can not find it in program file.

    Got this fixed.
    I deleted Yahoo as a search engine.
    To do this: on the right hand side of a toolbar there is a pull down menu which contains "manage search engines". Select this and remove "Yahoo".
    BTW: the "Tools" - "Options" - "remove hardware acceleration.. " did not work.
    George

  • Hi - Have a Javascript (search) that was ok thru 9, but won't run in X. Thank you.

    Hi - Have a Javascript (search) that was ok thru 9, but won't run in X. Thank you

    Quoting the Acrobat X SDK:
    Changes to search object
    The following changes have been made to the "search" object properties:
    ● The thesaurus and soundex properties have been removed
    ● The legacySearch property is now deprecated and always returns false.
    Changes to SearchExecuteQuery
    The following have been removed from nWordOptions parameter of SearchExecuteQuery:
    ● kWordOptionSoundsLike
    ● kWordOptionThesaurus
    The function SearchIsLegacySearchAvailable has been deprecated and will always return false.

  • I purchased an iPad 3 this summer.  I have looked and searched that thing and cannot find the sim card tray - where is it????

    I purchased an iPad 3 this summer.  I have looked & searched that thing and cannot find a sim card tray, where is it?? does it have one??

    If your iPad does not look like this on the side, you have the Wi-Fi only iPad.

  • How do I stop this please You are not sharing your location. Sharing your location helps provide searches that are geographicaly closer to you

    When I go to this website it's giving me this
    You are not sharing your location. Sharing your location helps provide searches that are geographicaly closer to you
    This pops up how do I stop it there is NO x
    Thank you

    You can set the default setting for Share Location for all sites on the about:permissions page.
    *https://support.mozilla.org/kb/how-do-i-manage-website-permissions
    The about: protocol is used to access special built-in pages.<br />
    You can open built-in about: pages via the location bar like you open a web page and in most cases you see a special orange Firefox icon on the location bar.

  • IPhone will not display calendar items more than one day in advance.

    iPhone will not display calendar items more than one day in advance. 
    I used to have a droid and loved the calendar on the main screen that used to show me the next few appointments coming up - so far I have only figured out how to put in to show for next day or 2 days or etc....
    is there any way to show tomorrow and next few days in notification, or is there a good app out there that will greet me. dont have 4s to ask just a 4
    i used google calendar and they all show up in calendar but REALLY need the functionality to see what is coming up, kind of like what you see in outlook or any other email program.
    please help out this noob.

    Is this what you're doing:
    OS X Yosemite: Recover your entire system

  • The computer that I first used to download iTunes is no more. I have a new computer that I set my wife up on.  While I can see all my music in the iTunes library I cannot sync my iPod

    The computer that I first used to download iTunes, to buy songs and to sync my iPod Nano to iTunes is no more.  I have a new computer that I inadvertently set my wife up on.  When I sign in, while I can see all my music in the iTunes library, when I tried to 'sync', I have lost all my music in my iPod and I now have my wife's library on there instead.
    I subscribed to iTunes Match, thinking that this would help.  It hasn't and I'm not happy!
    I have arranged to take my iPod into an Apple store next Tuesday but isn't there something you can tel me to do that ties my iPod wth my music and leaves my wife's music for her iPod?  Please help, I am so frustrated and have wasted so much time on this, reinstalling iTunes, restoring my iPod....
    Can anyone help? 

    Have you read for possible solutions over in the "More Like This" thread over here?----------------------->
    Check out the following KB Articles:  http://support.apple.com/kb/HT1329 How to use your iPod to move your music to a new computer
    http://support.apple.com/kb/HT4527 iTunes: How to move your music to a new computer

  • HT4623 I am trying to update my phone but it tells me I don't have enough storage.  I have deleted almost all of my apps and purchased 15GB more storage and it still tells me that I don't have enough storage?

    I am trying to update my phone, but it tells me that I don't have enough storage.  I have deleted almost all of my apps and purchased 15GB more storage, but it still tells me that I don't have enough storage?

    Connect to iTune and "Check for Update" (tap to enalrge image)

  • Since being in Mexico both my iPad and iPhone seem to be using up their batteries more quickly.  Any thoughts on why that might be?

    since being in Mexico both my iPad and iPhone seem to be using up their batteries more quickly.  Any thoughts on why that might be?

    Did they drink the water? 
    Using the battery level meter in this manner is comparable to using your car's fuel gauge to calculate miles per gallon. The only thing that matters is the total amount of operating time from full charge to auto-shutdown.
    Use the wall-mount charger that came with the iPad or another 10W/12W Apple charger and, one at a time, charge both units overnight.  Do NOT use an iPod/iPhone (5W) charger.  Do NOT use a computer's USB port.  Then, operate it normally until auto shut-down (ignore any low level alerts that may appear).  An irony is that doing that test to determine the total operating time is also the procedure necessary to calibrate the battery level meter.
    I'm not claiming that you do not have a problem.  I am stating, however, that we don't yet know.  If the above test does, in fact, indicate a problem, read this.
    Also, according to Apple:
    Use Your iPad Regularly
    For proper reporting of the battery’s state of charge, be sure to go through at least one charge cycle per month (charging the battery to 100% and then completely running it down).
    Elsewhere, Apple elaborates and explains that two half-discharges (or four quarter-discharges, etc.) equals one full discharge.

  • The Tools , Options then the Advanced Tab, that the Allow 3rd Party to downlaod updates is missing.

    I updated Firefox to 16.0.1 and then I checking to see that the download went okay and according to the download history everything went okay, however on the Tools, Options then Advanced Tab, that do you want to Allow 3rd Party to download is missing, I don't know what happened. On the last download the 15.0, this component downloaded, and I checked it so that I can download the updates.
    Do I need to uninstall this Firefox and reinstall it? Did I get a corrupted version?
    The update worked okay on my laptop & my husband computer but not mine.
    Please contact me.
    Thank you,
    Mrs. Mumm
    my email is: [email protected]

    Can you attach a screenshot?
    *http://en.wikipedia.org/wiki/Screenshot
    *https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
    Use a compressed image type like PNG or JPG to save the screenshot.
    To see all history and cookie setting, you can use:
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Can the resolution be changed when taking a photo.  When I take a photo it is always 1MEG or more.  Like to reduce this so that the photos are easily e-mailed.  Any help?

    Can the resolution be changed when taking a photo.  When I take a photo it is always 1MEG or more.  Like to reduce this so that the photos are easily e-mailed.  Any help?

    When you email a picture from Photos, you can choose the size.
    http://i1224.photobucket.com/albums/ee374/Diavonex/3bec08e4423ac97de93d4560186b6 daf.jpg

  • TS1424 Hi. I just added $25 gift card into the redeem in the app store and purchased four different apps for $4.99 each. I was planning on purchasing one more app at $4.99, but showed that I do not have the $5.00 in my redeem. Instead I have only $4.80?!?

    Hi. I just added $25 gift card into the redeem in the app store and purchased four different apps for $4.99 each. I was planning on purchasing one more app at $4.99, but showed that I do not have the $5.00 in my redeem. Instead I have only $4.80?!?!?!?
    Is there taxes that's going on here?
    I feel jipped!

    There will indeed be taxes, assuming you are in an area where sales tax is normally charged.

Maybe you are looking for

  • Sharepoint Workflow to change another item in the same library

    Is it possible to change another item in the current library using a sharepoint workflow I currently has a customised approval workflow that approves procedures. I would like this workflow to set the status of the previous version to archive when the

  • How can I take a pic

    Hi Can not detect the font of the text, I was wondering if I can take a pic of the original text and paste it in the editing pdf, is it possible to do this and how can I take a pic of the selected area of the pdf?

  • SAP Discovery system access to BI and EP

    Dear support, We have setup our Discovery System and we’re trying to connect it to our DEV 4.7 system for the purpose of prototyping the use of BI and the Enterprise Portal.  We’re running into issues due to our lack of knowledge and SAP’s lack of go

  • Why won't the Flickr uploader PSE 8 work right on Vista or Windows 7?

    I used to upload photos using PSE 6 to Flickr on Windows XP machine all the time w/o problems. Recently after buying a new computer, PSE 8, and Vista 64 bit I get a message that says there is a problem. I more recently upgraded to Windows 7, 64 bit,

  • Photoshop 6 Install Problems on Mavericks

    I hope somebody can help? I have just purchased a second hand copy of Photoshop 6 (year 2000) I'm trying to install this on a Macbook Pro running Mavericks OS. When I click to Install the software, I get this message pop up: You can't open the applic