Subject RE: [firebird-support] Re: Calling procedure from trigger
Author Martin Dew
I believe to call a stored proc from a trigger you need to use soemthing like

Execute procedure Test

Not too sure though......

Martin Dew

-----Original Message-----
From: Michael Vilhelmsen [mailto:Michael.Vilhelmsen@...]
Sent: 28 August 2003 11:27
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Calling procedure from trigger


Yes it actually gave my a little problem.

I have made a small stored procedure like this (called test):

begin
ii = 0;
while (ii < strlen(in_p)) do
begin
if (substr(In_P,ii,ii)='ø') then
begin
out_p = 'Ø';
end
else
begin
out_p = substr(In_P,ii,ii);
end
ii = ii + 1;
end
suspend;
end

Where II is a variable as integer
in_p is varchar(30)
out_p is varchar(30)
This procedure get generated OK.

when I define a trigger like this:

if (new.varenavn1 <> old.varenavn1) then
begin
new.uniktvarenavn1 = test(new.varenavn1);
end;

it tells me, that test is an unknown FUNCTION.

Besides that I would like to be able to do this in SQL:

Update MyTable set
MyVarChar = MyVarChar + SomeCharValue

But thats not posible or is it ?

Michael



------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/67folB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to: firebird-support-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/