dbTalk Databases Forums  

All rows if null

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss All rows if null in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
banaslee
 
Posts: n/a

Default Re: All rows if null - 04-14-2008 , 04:34 AM






On Apr 13, 5:08 pm, Gints Plivna <gints.pli... (AT) gmail (DOT) com> wrote:
Quote:
On 4 Apr., 12:51, banaslee <banas... (AT) gmail (DOT) com> wrote:



Hi there.

I'm new to oracle and I'd want to build a form search.
I'm currently using dynamic sql to append all the where clauses that
has no null values on the corresponding form text boxes but I'm
searching for a more elegant and static solution.

In text I can use WHERE nvl(a.foo, ' ') = b.foo || '%' so that if
b.foo is null it returns all the a.foo rows and I can still use an
index if I create it like CREATE INDEX foo_idx ON a(nvl(foo, ' ')).
But what about number values? Is there any better solution for them?

I hope I had been enough specific on my question.

Thanks in advance for your help,
Fábio Oliveira

For different possibilities look herehttp://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1...

Gints Plivnahttp://www.gplivna.eu
Thanks a lot! I was looking for an explanation like that since the
beginning. "Cursor" is not the best title for that article though.


Reply With Quote
  #32  
Old   
banaslee
 
Posts: n/a

Default Re: All rows if null - 04-14-2008 , 04:34 AM






On Apr 13, 5:08 pm, Gints Plivna <gints.pli... (AT) gmail (DOT) com> wrote:
Quote:
On 4 Apr., 12:51, banaslee <banas... (AT) gmail (DOT) com> wrote:



Hi there.

I'm new to oracle and I'd want to build a form search.
I'm currently using dynamic sql to append all the where clauses that
has no null values on the corresponding form text boxes but I'm
searching for a more elegant and static solution.

In text I can use WHERE nvl(a.foo, ' ') = b.foo || '%' so that if
b.foo is null it returns all the a.foo rows and I can still use an
index if I create it like CREATE INDEX foo_idx ON a(nvl(foo, ' ')).
But what about number values? Is there any better solution for them?

I hope I had been enough specific on my question.

Thanks in advance for your help,
Fábio Oliveira

For different possibilities look herehttp://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1...

Gints Plivnahttp://www.gplivna.eu
Thanks a lot! I was looking for an explanation like that since the
beginning. "Cursor" is not the best title for that article though.


Reply With Quote
  #33  
Old   
banaslee
 
Posts: n/a

Default Re: All rows if null - 04-14-2008 , 04:34 AM



On Apr 13, 5:08 pm, Gints Plivna <gints.pli... (AT) gmail (DOT) com> wrote:
Quote:
On 4 Apr., 12:51, banaslee <banas... (AT) gmail (DOT) com> wrote:



Hi there.

I'm new to oracle and I'd want to build a form search.
I'm currently using dynamic sql to append all the where clauses that
has no null values on the corresponding form text boxes but I'm
searching for a more elegant and static solution.

In text I can use WHERE nvl(a.foo, ' ') = b.foo || '%' so that if
b.foo is null it returns all the a.foo rows and I can still use an
index if I create it like CREATE INDEX foo_idx ON a(nvl(foo, ' ')).
But what about number values? Is there any better solution for them?

I hope I had been enough specific on my question.

Thanks in advance for your help,
Fábio Oliveira

For different possibilities look herehttp://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1...

Gints Plivnahttp://www.gplivna.eu
Thanks a lot! I was looking for an explanation like that since the
beginning. "Cursor" is not the best title for that article though.


Reply With Quote
  #34  
Old   
Gints Plivna
 
Posts: n/a

Default Re: All rows if null - 04-14-2008 , 02:30 PM



Quote:
Thanks a lot! I was looking for an explanation like that since the
beginning. "Cursor" is not the best title for that article though.
That's the title original author had given. However I can only agree
to you

Gints Plivna
http://www.gplivna.eu


Reply With Quote
  #35  
Old   
Gints Plivna
 
Posts: n/a

Default Re: All rows if null - 04-14-2008 , 02:30 PM



Quote:
Thanks a lot! I was looking for an explanation like that since the
beginning. "Cursor" is not the best title for that article though.
That's the title original author had given. However I can only agree
to you

Gints Plivna
http://www.gplivna.eu


Reply With Quote
  #36  
Old   
Gints Plivna
 
Posts: n/a

Default Re: All rows if null - 04-14-2008 , 02:30 PM



Quote:
Thanks a lot! I was looking for an explanation like that since the
beginning. "Cursor" is not the best title for that article though.
That's the title original author had given. However I can only agree
to you

Gints Plivna
http://www.gplivna.eu


Reply With Quote
  #37  
Old   
Gints Plivna
 
Posts: n/a

Default Re: All rows if null - 04-14-2008 , 02:30 PM



Quote:
Thanks a lot! I was looking for an explanation like that since the
beginning. "Cursor" is not the best title for that article though.
That's the title original author had given. However I can only agree
to you

Gints Plivna
http://www.gplivna.eu


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.