Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with filtering data

Ivan2405Aug 26 2013 — edited Aug 26 2013

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

This post has been answered by Denes Kubicek on Aug 26 2013
Jump to Answer

Comments

Denes Kubicek
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

-------------------------------------------------------------------

Marked as Answer by Ivan2405 · Sep 27 2020
Ivan2405

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

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 23 2013
Added on Aug 26 2013
2 comments
201 views