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!

something wrong?

Status
Not open for further replies.

totti24

Programmer
Aug 2, 2002
32
MY
create or replace function add_user() returns opaque as '
declare
varname
begin
select myname into varname from table where myname = NEw.myname;

raise notice ''user name %'',varname;

update table set myage = 20 where myname = varname;
return new;
end;


can i know what is wrong with the above code?? coz if i perform an update, i will get a lot of notices for "user name %" eventhough i din perform a loop.
 
probably the UPDATE you do is doing updates on many rows, thus on many usernames

post your update statement if not clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top