SQLTeam.com | Weblogs | Forums

Numbering trigger


#1

Hi I need help of creating a trigger. I have 2 tables those are

  1. Division
    ID Rnum
    01 001
    02 001

  2. Transaction
    Div Trans.ID

I need to create trigger that resulting unique number on transaction file. Both table is related on Transaction.Div = Division.ID. The scenario is after the transaction saved on transaction table, the trans.id will save the Rnum value and the Rnum on Division will added 1 and so on.

Thx


#2

I think you may have to expand on what your problem is. It's a bit confusing.


#3

it is almost same case of stock update of sales transaction. When there's a sales the qty of the master stock will be added with the total qty of sales.

thx