RE: [Maybe Spam] to create trigger

RE: [Maybe Spam] to create trigger

 

  

You might need a non semi-colon delimiter at the end. Try putting # after
your last END, save as a script and execute from Command Line Processor

db2 -vf temp.sql -td#

Mark

-----Original Message-----
From: vijaykumar
[mailto:db2udbdba-ezmlmshield-x65856456.[Email address protected]
Sent: 31 May 2006 10:28
To: LazyDBA Discussion
Subject: [Maybe Spam] to create trigger


CREATE TRIGGER DB2ADMIN.DEL_PROD_PART_DTL AFTER DELETE ON
DB2ADMIN.TB_PROD_ORD_PART_DTL REFERENCING OLD AS OLD FOR EACH ROW
MODE DB2SQL
BEGIN ATOMIC
update tb_order_dtl set prod_ord_qty = coalesce (prod_ord_qty, 0) -
OLD.prod_ord_qty
where (order_type, order_yr, order_no) in (select
order_type, order_yr, order_no
from tb_prod_ord_hdr where prod_ord_year = OLD.prod_ord_year
and
prod_ord_no = OLD.prod_ord_no) and mat_code = OLD.mat_code;
END

When I try to create the above trigger from control center command
editor then error raises as "The command was processed as an SQL
statement because it was not a valid Command Line Processor command."

How can I create this trigger?


By
Vijaykumar.g


---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


This e-mail (and any attachments) may contain privileged and/or confidential information. If you are not the intended recipient please do not disclose, copy, distribute, disseminate or take any action in reliance on it. If you have received this message in error please reply and tell us and then delete it. Should you wish to communicate with us by e-mail we cannot guarantee the security of any data outside our own computer systems. For the protection of Legal & General's systems and staff, incoming emails will be automatically scanned.

Any information contained in this message may be subject to applicable terms and conditions and must not be construed as giving investment advice within or outside the United Kingdom.

The following companies are subsidiary companies of the Legal & General Group Plc which are authorised and regulated by the Financial Services Authority for advising and arranging the products shown: Legal & General Partnership Services Limited (insurance and mortgages), Legal & General Insurance Limited (insurance), Legal & General Assurance Society Limited
(life assurance, pensions and investments), Legal & General Unit Trust Managers Limited and Legal & General Portfolio Management Services Limited (investments).

They are registered in England under numbers shown.
The registered office is Temple Court, 11 Queen Victoria Street, London EC4N 4TP.

Legal & General Partnership Services Limited: 5045000 Legal & General Assurance Society Limited: 166055 Legal & General (Unit Trust Managers) Limited: 1009418 Legal & General (Portfolio Management Services) Limited: 2457525 Legal & General Insurance Limited: 423930

They are registered with the Financial Services Authority under numbers shown. You can check this at www.fsa.gov.uk/register

Legal & General Partnership Services Limited: 300792 Legal & General Assurance Society Limited: 117659 Legal & General (Unit Trust Managers) Limited: 119273 Legal & General (Portfolio Management Services) Limited: 146786 Legal & General Insurance Limited: 202050


DB2 & UDB email list listserv db2-l LazyDBA home page