Page 1 of 1

How to bring all records

Posted: Sun Apr 20, 2008 4:00 am
by AIMAM
hello,

i have the following line in a query:

AND (mmt.ATTRIBUTE1)= NVL(:P _Subject,mmt.ATTRIBUTE1)

It gives me only the not null "mmt.ATTRIBUTE1" records when the parameter is not entered.

How can i modify this in order to bring all the records even where the column mmt.ATTRIBUTE1 is NULL

Thank you..

Posted: Thu Apr 24, 2008 8:19 am
by crom
Hello,

try this:

and nvl(mmt.attribute,'!!') =
nvl(:p_subject,nvl(mmt.attribute,'!!'))

I hope it helps !