User Profile

Collapse

Profile Sidebar

Collapse
anpbabaki
anpbabaki
Last Activity: Jun 8 '07, 06:58 PM
Joined: Jun 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • anpbabaki
    replied to SQL 2005 trigger Help
    this is hwatt i came up with anyone see any flaws? it seems to work as i want it to

    set ANSI_NULLS ON
    set QUOTED_IDENTIFI ER ON
    go




    ALTER TRIGGER [monitorJournal]
    ON [dbo].[Journal]
    AFTER INSERT, UPDATE
    AS
    SET NOCOUNT ON;
    IF (select AssetTag from inserted) <> '' AND (select transferTo from Inserted) <> '' AND (select transferToCustT ype...
    See more | Go to post

    Leave a comment:


  • anpbabaki
    started a topic SQL 2005 trigger Help

    SQL 2005 trigger Help

    Hello
    I have 2 tables, Journal and Config

    Journal holds fields AssetTag, TransferFrom, TransferTo
    Config holds AssetTag, CustID

    I cannot figure out how to create a trigger that when a record is inserted into Journal, the trigger finds the record in Config with the matching AssetTag and updates Config.CustID with the data from Journal.Transfe rTo

    (AssetTag is unique in Config table)
    See more | Go to post
No activity results to display
Show More
Working...