1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How do I make an PL/SQL advanced search SELECT statement work

Discussion in 'SQL PL/SQL' started by Ashafie, Mar 12, 2014.

  1. Ashafie

    Ashafie Guest

    I am doing an advanced search page in PL/SQL which has several textfields for input and a search button. The challenging part is that the user can choose to leave any field blank or fill in the corresponding information for that particular textfield, and the select statement that takes in the values of these fields for comparison to narrow down the search needs to be able to ignore empty textfields. I have handled this in my code by using IS NOT NULL in the where clause of the code so that NULL variables are ignored. The problem that I encounter is that doing this gets the application to crash when I am running it. I discovered through testing that this part is exactly what kept making the page crash because when I removed this from the WHERE clause it didn't crash any more. An experienced PL/SQL programmer has most probably encountered this and knows how to get around it. Let me know!
  2. DTSIGuy

    DTSIGuy Forum Advisor

    Likes Received:
    Trophy Points:
    Have you tried having your search page display the SQL statement it is attempting to run? This sounds like a parsing problem...hard to say though as it doesn't appear that you are attempting to trap the error.