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 -> insert statement in a function or select statement

insert statement in a function or select statement

From: Sharkie <sharkdba_at_yahoo.com>
Date: 3 Jun 2004 13:14:05 -0700
Message-ID: <423b5ab1.0406031214.5c9b6070@posting.google.com>


Oracle 8.1.7 on Solaris.

Is it possible to somehow execute an insert statement inside a function or another select statement? Here's what I need to happen:

select blah blah from blah where (insert statement here)
--insert statement can be in the "where" or "select" part, doesn't matter

or

select insert_function('some parameter') from dual where blah blah
--the insert function would insert a record

From what I read functions do not allow insert/update statements, and procedures cannot be called from a select statement (someone correct me if this is wrong).

We have a read-only application which is setup so only select statements against database are accepted. No direct non-select DML statements allowed. There is one exception though, where an insert statement has to happen. So having as my tool only select statements (functions or functions inside a package are OK) can I issue the insert statement? Received on Thu Jun 03 2004 - 15:14:05 CDT

Original text of this message

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