Trigger Solution

sql server United States
  • 18 years ago

     I have two tables below named stock and sent in a trouble to make trigger. What I need, If any user update or insert data in stock table,the "sent" column should change to '1' and also insert that updated row to stocksent table. We have to sonsider the duplicate value should not be added to stocksent table..
    After senting Stocksent data to Another Location I want to delete the records in stocksent table and to change the sent column of the stock table to '0' again..


    Please any one can help me....?


    create table STOCK,stocksent
    (itemcod char(8)primary key,
    refcode char(10),
    grpid char(5),
    grpdrs char(6),
    brandname char(15),
    descript char(30),
    pack char(15),
    stock numeric(5),
    sent int(1)default'0',
    )

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perl - The only language that looks the same before and after RSA encryption.” - Keith Bostic