Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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
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: unknown_filename
Description: text/html (1.4 KB)

pgsql-novice by date

Next:From: joseph speigleDate: 2004-04-28 14:15:00
Subject: Re: error on starting server
Previous:From: Robert MorganDate: 2004-04-28 07:27:00
Subject: error on starting server

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group