Re: Views and Stored Procedures

From: SOLSPEAKS <solspeaks_at_aol.com>
Date: Sat, 21 Feb 2004 16:13:27 GMT
Message-ID: <HsLZb.374926$na.566706_at_attbi_s04>


If by stored procedure you mean a database function, the answer is yes. You can simply use the value returned by the function as a column in your view.

For example,
  If you had a function named ACTION1 that took a single parameter, could create a view as follows:

create view test1 as select ename,action1(enum) action_enu m from employee;

The only caveat is that the function must not change the state of the database. (The only DML it may perform is a SELECT. No UPDATES,DELETES, or INSERTS). "tkestell" <tkestell_at_comcast.net> wrote in message news:foYYb.356311$na.534883_at_attbi_s04...
> Is it possible to use a stored procedure as the source of data for a view?
>
> The reason I want to use a stored procedure is because (for this
 particular
> situation),
> the execution speed is significantly faster.
>
>
>
Received on Sat Feb 21 2004 - 17:13:27 CET

Original text of this message