Subject Re: Help with trigger syntax
Author grip_2ls
Thank you all for your help and advice.

N

--- In firebird-support@yahoogroups.com, Mark Rotteveel <mark@...> wrote:
>
> On Tue, 01 Nov 2011 10:00:38 +1300, Helen Borrie <helebor@...>
> wrote:
> > At 07:56 AM 1/11/2011, you wrote:
> >>On 31-10-2011 17:46, grip_2ls wrote:
> >>> Hi Mark
> >>>
> >>> Thanks for the advise but I don't think that is the issue. If you
> >>> remove the second select statement it compiles and runs fine.
> >>
> >>That was exactly the issue I was pointing out. You are using SELECT
> >>without INTO to call SendMail. That doesn't work as Sean also pointed
> out.
> >
> > Furthermore, invoking that Sendmail procedure as a select procedure is
> not
> > sensible in this environment or any other. Make it an executable
> procedure
> > and, in the trigger code, call it with EXECUTE PROCEDURE (:var1, :var2,
> > etc.) Selectable procedures are intended to return sets and shouldn't
> be
> > used to execute DML.
>
> Helen, it was actually a singleton select against RDB$DATABASE calling the
> SendMail UDF in the column list.
>