Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem creating a simple procedure

Status
Not open for further replies.

stebjo

Technical User
Apr 1, 2002
5
SE
Why do i get a simple query like this invalid when i save it like
a procedure:
-----------------------------------------
CREATE PROCEDURE select_table
AS
BEGIN
select * from test where name = ('Kim');
END;
-------------------------------------------
When i get this procedure Valid:
-------------------------------------------
CREATE PROCEDURE insert_table
AS
BEGIN
insert into insert_table (name) values ('Kim');
END;

???????
using Oracle 8I

Please help!!


 
Look into REFCURSORS and IN and OUT parameters... Pl/Sql is not Sql or SqlPLus - It has specific requirements for returning data ( especially a whole row of data..)

hth
[profile]

( ps the insert works because no data needs to be returned to the 'caller' - it is not well-formed however, and any errors would be undiscovered - read more about procedures in the Pl/Sql Docs..)
 
Thank's man, at least i know what to look 4.
:)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top