Frank Y wrote:
> Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1073532874.570433_at_yasure>...
>
>>Frank Y wrote:
>>
>>
>>>dmx_frank_at_yahoo.com (Frank Y) wrote in message news:<9d599275.0401052027.495c4690_at_posting.google.com>...
>>>
>>>
>>>>Hello there,
>>>>
>>>>I am using Oracle 9i on Windows 2000 Server. I need to create an
>>>>operator to return a string with length 20.
>>>>
>>>>If I use the following statement:
>>>>CREATE OPERATOR test ....
>>>>RETURN VARCHAR2....
>>>>...
>>>>
>>>>the return string has a default length 4000.
>>>>
>>>>Does any one know to make the return string length 20?
>>>>
>>>>
>>>>thanks a lot.
>>>>
>>>>Frank
>>>
>>>
>>>The reason I ask this because I need to create an operator to build a
>>>domain index. And this operator is used in a View. When my
>>>application accesss this view, an buffer overflow was occured because
>>>the return length of the operater is 4000. I cannot change the
>>>application source code because I donot own it. The only way I can
>>>think is to limit the output size of the operator, that is why I ask
>>>this question.
>>>
>>>Any one can have ideas to help me?
>>>
>>>Frank.
>>
>>I posted the solution once. Wasn't that enough?
>>
>>SELECT CAST(object_name AS VARCHAR2(20)) OBJ_NAME
>>FROM user_objects;
>>
>>http://www.psoug.org/reference/cast.html
>
>
> I have tried the CAST , it works for if the object is a function, but
> it doesnot work for the object which is Operator. It give me the
> following error:
> ORA-24328: illegal attribute value
>
> Any other idea?
>
> Frank
Since user defined operators are based on functions ... are you putting
the CAST into the operator or the underlying function? Post your code if
you wish.
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Jan 09 2004 - 10:47:03 CST