Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL where clause quandary

PL/SQL where clause quandary

From: Steven <voivod455_at_yahoo.com>
Date: 2 Sep 2003 09:21:45 -0700
Message-ID: <e9612d4c.0309020821.431e304d@posting.google.com>


Hopefully someone has an idea of how to solve this. I have a 3rd party application that generates something similar to the following query:

select a,b from points where a = 2 and a = 10;

It really should be:
select a,b from points where a is between 2 and 10;

But the problem is (since I don't have access to the 3rd party source code of course) only the name of the table is configurable (the where clause is the same everytime just with different numbers and generated via the app).

So I was thinking of trying some pipelined function like select a,b from table(pointpipe) where a = 2 and a = 10;

This would work except I see no way in pl/sql of passing in the where clause to the function so it can transform the sql statment.

I don't see a good solution right now, but maybe someone has already done this.
Oracle docs don't really help on this one.

Thanks,
- Steven

voivod455_at_yahoo.com Received on Tue Sep 02 2003 - 11:21:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US