Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Problem with filtering data

Hi!
I'm having trouble with filtering data from my table and don't know how to resolve it properly.
I created a tabular form my table, a few text fields that are used as input for different columns of the filter and a filter button that submits the page.
The problem appeared when I try to filter a column that has null values in the table and is editable...that's as far as I have concluded.
So when I press the button I get zero rows even though there should be some.
This is the submitted query:
select
"MSR_PRD_ID",
"SRC_STM_ID",
"ID",
"ISIN",
...
from "#OWNER#"."IZV_SLOG_DET"
WHERE
lower(MSR_PRD_ID) = lower(nvl(:P7_X_MSR_PRD_ID,MSR_PRD_ID)) and
lower(SRC_STM_ID) = lower(nvl(:P7_X_SRC_STM_ID,SRC_STM_ID)) and
lower(ISIN) = lower(nvl(:P7_X_ISIN,ISIN)) and
...
The nvl function is used so that if the user leaves the field empty it only filters by the fields that have input.
Does anyone know how I could circumvent this?
Regards,
Ivan
Best Answer
-
LOWER (NVL (ISIN,'Y')) = LOWER (NVL (:P7_X_ISIN, LOWER (NVL (ISIN,'Y'))))
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------
Answers
-
LOWER (NVL (ISIN,'Y')) = LOWER (NVL (:P7_X_ISIN, LOWER (NVL (ISIN,'Y'))))
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------
-
Thanks for the quick reply Denes!
I tried it and it works.
I just hope it won't reduce the performance since the table is pretty big and there are a few columns that can be null...
Best regards,
Ivan