Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    119

    Unanswered: Triggers - insert data to another table

    How do I set up an insert trigger to copy all of the inserted data to another table?

    In other words, when someone adds a new paramater in the params table, I want to automatically create a matching set of data in the goals table.

    Thanks,
    Krista

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Have you not used SELECT INTO or INSERT INTO statements in SQL, refer to the books online for more information.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You will use INSERT INTO in a trigger that references the virtual INSERTED table.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •