Re: PL/SQL User defined Functions

From: David Hermann <dhe_at_phcs.phcs.com>
Date: 1995/09/18
Message-ID: <43ju51$1se_at_palm.phcs.com>#1/1


In article <43crb9$942_at_gold.interlog.com>, spo_at_interlog.com (John Parrott) writes:
|> I'm relatively new to Oracle and I am having trouble converting a SQL
|> statment into a stored procedure. The following statment select the
|> maximum date from a range column that is below a certain value
|>
|> select max( CDate) from
|> (Select to_date( StringColumn) as CDate
|> from TTable
|> where KeyID = 'TEST')
|> where CDate < '01-JUN-95';
|>
|> The to_date( ...) function is actually a little more complicated in my
|> function because it is derived from a string. How do I convert this into
|> a function where 'TEST' and '01-JUN-95' are passed in as paramters?

You need to CREATE OR REPLACE FUNCTION using PRAGMA RESTRICT_REFERENCES, whose description is hidden in the PL/SQL Addendum Manual for Oracle 7.1.4. (I'm not sure of the exact doc. title -- the nearest copy is three floors away.) Received on Mon Sep 18 1995 - 00:00:00 CEST

Original text of this message