Re: Procedures-Views mix?

From: Dante <dnotari_at_my-dejanews.com>
Date: Tue, 25 May 1999 10:26:15 GMT
Message-ID: <7idts6$j58$1_at_nnrp1.deja.com>


In Oracle8 (with some restrictions
 in Oracle7) you can use functions
 in a view.

[Quoted] CREATE OR REPLACE FUNCTION say_hello_to(thename VARCHAR2)   RETURN VARCHAR2
AS
BEGIN
  RETURN 'Hello ' || thename;
END;
/

Function created.

CREATE VIEW hello_view
AS
 SELECT say_hello_to(username) hello from all_users  /

View created.

SELECT * FROM HELLO_VIEW; HELLO



Hello SYS
Hello SYSTEM
Hello OUTLN
Hello DBSNMP
Hello AURORA$ORB$UNAUTHENTICATED
Hello SCOTT
Hello DEMO
Hello ORDSYS
Hello ORDPLUGINS
Hello MDSYS

10 rows selected.

Regards
Dante

In article <3745B724.E1C415FF_at_aug.edu>,   Alex Yurchenko <ayurchen_at_aug.edu> wrote:
> Hi everyone
>
> I'd like to create a "view with parameters", or basically I want a
> procedure which returns records. Is there is any way to do that.
Thanks.
>
> --
>
> home e-mail: snake76_at_mindspring.com
> work e-mail: ayurchen_at_aug.edu
> home page: http://www.mindspring.com/~snake76
>
> ********************************************************
> Religion is the opium of the people.
> C. Marx
> ********************************************************
> Friends will be friends
> "Queen"
> ********************************************************
> Knowing what
> thou knowest not
> is in a sense
> omniscience
> P. Hein
> ********************************************************
> Teaching should be such that what is offered is perceived
> as a valuable gift and not as a hard duty.
> A. Einstein
> ********************************************************
>
>

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Tue May 25 1999 - 12:26:15 CEST

Original text of this message