Subject | Triggers and special characters |
---|---|
Author | |
Post date | 2015-11-30T08:17:19Z |
Hello
I have come across a problem regarding special characters and triggers.
I would like to create this trigger:
SET TERM ^^ ;
CREATE TRIGGER UPD_VV_LAENGDE FOR VAREFRVSTR_DETAIL ACTIVE AFTER UPDATE POSITION 23 AS
BEGIN
IF ((OLD.AntalStk <> NEW.AntalStk) or
(OLD.Beh_Kostpris <> NEW.Beh_Kostpris) or
(OLD.Beh_SalgsPris <> NEW.Beh_SalgsPris) or
(OLD.Beh_SalgsPrisMoms <> NEW.Beh_SalgsPrisMoms) or
(OLD.Beh_Kostpris_VAL <> NEW.Beh_Kostpris_VAL) or
(OLD.Beh_SalgsPris_VAL <> NEW.Beh_SalgsPris_VAL) or
(OLD.Beh_SalgsPrisMoms_VAL <> NEW.Beh_SalgsPrisMoms_VAL)
) THEN
BEGIN
if(NEW.Laengde_Navn<>'Ingen længde') then
begin
update Laengde_Detail set
LagerStk = LagerStk + (NEW.AntalStk - Old.AntalStk),
LagerKr = LagerKr + (NEW.Beh_SalgsPris - Old.Beh_SalgsPris),
LagerKpr = LagerKpr + (NEW.Beh_KostPris - Old.Beh_KostPris),
LagerKr_Moms = LagerKr_Moms + (NEW.Beh_SalgsPrisMoms - Old.Beh_SalgsPrisMoms),
LagerKr_Val = LagerKr_Val + (NEW.Beh_SalgsPris_Val - Old.Beh_SalgsPris_Val),
LagerKpr_Val = LagerKpr_Val + (NEW.Beh_KostPris_Val - Old.Beh_KostPris_Val),
LagerKr_Moms_Val = LagerKr_Moms_Val + (NEW.Beh_SalgsPrisMoms_Val - Old.Beh_SalgsPrisMoms_Val)
Where Laengde_Detail.Navn=NEW.Laengde_Navn and
Laengde_Detail.Afdeling_ID=NEW.Afdeling_ID;
end
END
END ^^
SET TERM ; ^^
The danish charecter æ gives me an error: Malformed string.
I have tried to google this, but I can't find what I am looking for.
Is there an easy work around?
Regards
Michael
I have come across a problem regarding special characters and triggers.
I would like to create this trigger:
SET TERM ^^ ;
CREATE TRIGGER UPD_VV_LAENGDE FOR VAREFRVSTR_DETAIL ACTIVE AFTER UPDATE POSITION 23 AS
BEGIN
IF ((OLD.AntalStk <> NEW.AntalStk) or
(OLD.Beh_Kostpris <> NEW.Beh_Kostpris) or
(OLD.Beh_SalgsPris <> NEW.Beh_SalgsPris) or
(OLD.Beh_SalgsPrisMoms <> NEW.Beh_SalgsPrisMoms) or
(OLD.Beh_Kostpris_VAL <> NEW.Beh_Kostpris_VAL) or
(OLD.Beh_SalgsPris_VAL <> NEW.Beh_SalgsPris_VAL) or
(OLD.Beh_SalgsPrisMoms_VAL <> NEW.Beh_SalgsPrisMoms_VAL)
) THEN
BEGIN
if(NEW.Laengde_Navn<>'Ingen længde') then
begin
update Laengde_Detail set
LagerStk = LagerStk + (NEW.AntalStk - Old.AntalStk),
LagerKr = LagerKr + (NEW.Beh_SalgsPris - Old.Beh_SalgsPris),
LagerKpr = LagerKpr + (NEW.Beh_KostPris - Old.Beh_KostPris),
LagerKr_Moms = LagerKr_Moms + (NEW.Beh_SalgsPrisMoms - Old.Beh_SalgsPrisMoms),
LagerKr_Val = LagerKr_Val + (NEW.Beh_SalgsPris_Val - Old.Beh_SalgsPris_Val),
LagerKpr_Val = LagerKpr_Val + (NEW.Beh_KostPris_Val - Old.Beh_KostPris_Val),
LagerKr_Moms_Val = LagerKr_Moms_Val + (NEW.Beh_SalgsPrisMoms_Val - Old.Beh_SalgsPrisMoms_Val)
Where Laengde_Detail.Navn=NEW.Laengde_Navn and
Laengde_Detail.Afdeling_ID=NEW.Afdeling_ID;
end
END
END ^^
SET TERM ; ^^
The danish charecter æ gives me an error: Malformed string.
I have tried to google this, but I can't find what I am looking for.
Is there an easy work around?
Regards
Michael