Re: [SQL] trigger needs to check in multiple tables.

2006-08-18 Thread Michael Fuhr
On Fri, Aug 18, 2006 at 07:17:27PM +0200, Jacobo Garca wrote: > I'm running a simple query inside a function that is associated with a > trigger: > >SELECT tipo INTO tipocuenta FROM producto WHERE codigo_cuenta= > NEW.codigo_destino; > > I am getting this error when running the code on pgadmi

[SQL] trigger needs to check in multiple tables.

2006-08-18 Thread Jacobo García
Hello.I'm running a simple query inside a function that is associated with a trigger:    SELECT tipo INTO tipocuenta FROM producto WHERE codigo_cuenta=NEW.codigo_destino ;I am getting this error when running the code on pgadmin IIIERROR:  NEW used in query that is not in a rule QUERY:  SELECT  tipo