![]() | |
#31
| |||
| |||
|
|
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 |
#32
| |||
| |||
|
|
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 |
#33
| |||
| |||
|
|
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 |
#34
| |||
| |||
|
|
Thanks a lot! I was looking for an explanation like that since the beginning. "Cursor" is not the best title for that article though. |

#35
| |||
| |||
|
|
Thanks a lot! I was looking for an explanation like that since the beginning. "Cursor" is not the best title for that article though. |

#36
| |||
| |||
|
|
Thanks a lot! I was looking for an explanation like that since the beginning. "Cursor" is not the best title for that article though. |

#37
| |||
| |||
|
|
Thanks a lot! I was looking for an explanation like that since the beginning. "Cursor" is not the best title for that article though. |

![]() |
| Thread Tools | |
| Display Modes | |
| |