Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Ceating Trigger

Ceating Trigger

Scheduled Pinned Locked Moved Database
databasetutorialquestionworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kibromg 0
    wrote on last edited by
    #1

    Hi All, Could you please let me know how to set up a trigger for the following senario? How could i setup a trigger to populate a back_up table every time i do an Insert on the master Table. //-------------------------------------------------------------- INSERT INTO [repor32].[dbo].[Master_table] SELECT * FROM [repor32].[dbo].[Back_up] WHERE [ADETDATE] NOT IN (SELECT [ADETDATE] FROM [repor32].[dbo].[Master_table]) Thank you

    H 1 Reply Last reply
    0
    • K kibromg 0

      Hi All, Could you please let me know how to set up a trigger for the following senario? How could i setup a trigger to populate a back_up table every time i do an Insert on the master Table. //-------------------------------------------------------------- INSERT INTO [repor32].[dbo].[Master_table] SELECT * FROM [repor32].[dbo].[Back_up] WHERE [ADETDATE] NOT IN (SELECT [ADETDATE] FROM [repor32].[dbo].[Master_table]) Thank you

      H Offline
      H Offline
      Hesham Amin
      wrote on last edited by
      #2

      I'm not sure that I understand the scenario here. Is this the query that you will use in the trigger? or is the query that makes the insert in the master? amyway, check the CREATE TRIGGER[^] syntax from msdn

      Hesham A. Amin My blog

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups