Subject | Re: Calling procedure from trigger |
---|---|
Author | Michael Vilhelmsen |
Post date | 2003-08-28T10:27:07Z |
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
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