Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

The following triggering event caused the result error, the implementation of the two data update

ALTER TRIGGER "tr_shipper_line_in" AFTER INSERT
    ORDER 2 ON "DBA"."shipper_line"
    referencing new as new_shipper_line
    FOR each row   

      update shipper_line set
        create_time = getdate(*) where
        shipper_line.trans_no = new_shipper_line.trans_no and
        shipper_line.line_no = new_shipper_line.line_no;
    update customer set customer.user_7=customer.user_7-(new_shipper_line.quantity*part.user_10) from shipper,shipper_line,customer,part where  shipper_line.trans_no = new_shipper_line.trans_no and
        shipper_line.line_no = new_shipper_line.line_no and  shipper_line.trans_no=shipper.trans_no and shipper.customer_id=customer.customer_id and shipper_line.part_id=part.part_id and part.product_code ='XQ'


asked 13 Nov '13, 11:58

mfkpie8's gravatar image

accept rate: 12%

Change "update shipper_line ... ;" to "SET new_shipper_line.create_time = getdate();"

(13 Nov '13, 13:13) Breck Carter
Replies hidden

Also change "after insert" to "before insert" to be sure the modified data makes it into the new row.

(13 Nov '13, 14:05) Ron Emmert

thank you ROn emment !all right thanks Don't understand why, trigger the execution of the case is what circumstance

(14 Nov '13, 00:07) mfkpie8
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 13 Nov '13, 11:58

question was seen: 1,350 times

last updated: 14 Nov '13, 00:07