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 -> Calling user defined function in SQL where clause

Calling user defined function in SQL where clause

From: r2i <hpresingu_at_transformpharma.com>
Date: 7 Apr 2003 08:29:05 -0700
Message-ID: <6535d7a7.0304070729.585bb3e2@posting.google.com>


I require to call a function (for encryption..etc) inside a where clause of my sql.

Example:
select * from table
Where col = my_func();

The col is defined as a Varchar and this works fine as long as my_func() returns a string value.

However, i need to change the sql to handle multiple values in the where clause, therefore i changed the sql to select * from table
Where col in (my_func());

now my_func() returns a string which has multiple strings separated by commas.

This also works, as long as myfunc() returns 1 value. The moment i modify myfunc() to return multiple strings separated by commas, the sql fails to return any results. I tweaked myfunc() to return multiple values, with quotes, without quotes, embedded in double quotes..etc but to no affect.

Is there any way, i can get this to work, or find a solution to this problem in another way? Received on Mon Apr 07 2003 - 10:29:05 CDT

Original text of this message

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