Trigger Problem

From: "Ramesh Patel" <ramesh(at)banasdairy(dot)coop>
To: pgsql-novice(at)postgresql(dot)org
Subject: Trigger Problem
Date: 2004-04-28 10:27:24
Message-ID: 3292.10.1.1.34.1083148044.squirrel@banasdairy.coop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<p>Hi</p><p>i have one problem in Trigger.</p><p>this trigger alread work
on Red Hat Linux 7.3 but now i shift to RHL9.0</p><p>in RHL 9.0  not
working . in this problem in ROUND function.</p><p>but how to i slove this
i dont know. so please help me.</p><p>This is  Function and
Trigger.</p><p>/////////////////////////// Function Start
//////////////////////////////////////////</p><font size="2"><p>CREATE
FUNCTION add_issue_fun() returns opaque as'</p><p>BEGIN</p><p>UPDATE
mtrl_mst </p><p>set balstk_cs = balstk_cs -
NEW.issueqty_cs,</p><p>balstk_mt = round( cast((balstk_mt -
NEW.issueqty_mt) as numeric ),4)</p><p>where mtrl_mst.mtrl_code =
NEW.mtrl_code;</p><p>UPDATE rcpt_detail </p><p>set consqty_cs=consqty_cs +
NEW.issueqty_cs</p><p>WHERE rcpt_detail.batch_code = NEW.batch_code
</p><p>and rcpt_detail.mtrl_code = NEW.mtrl_code</p><p>and
rcpt_detail.loc_code = NEW.loc_code;</p><p>return
NULL;</p><p>END;'</p><p>language 'plpgsql';
</p><p>/////////////////////////// Function End
//////////////////////////////////////////</p><p>///////////////////////////
Trigger Start //////////////////////////////////////////</p><p>CREATE
TRIGGER add_issue_trg</p><p>AFTER INSERT ON issue_detail</p><p>FOR EACH
ROW EXECUTE PROCEDURE add_issue_fun();
</p></font><p>/////////////////////////// Trigger End
//////////////////////////////////////////<br /></p><p /><p>Thanking
You<br /><br />Ramesh Patel <br />Computer Dept. <br />Banasdairy,
Palanpur </p>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

Browse pgsql-novice by date

  From Date Subject
Next Message joseph speigle 2004-04-28 14:15:00 Re: error on starting server
Previous Message Robert Morgan 2004-04-28 07:27:00 error on starting server