Go Back   Garayed.com > Oracle
Reply
 
LinkBack Thread Tools Search this Thread Display Modes

All rows if null
  #1 (permalink)  
Old 04-04-2008, 10:51 AM
banaslee
 
Posts: n/a
Default All rows if null

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:59 AM.


Powered by vBulletin® Version 3.5.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
| Home | FAQ | Members List | Calendar | Today's Posts | Search | New Posts |