Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    5

    Unanswered: Trigger to Insert or Update 2nd Table

    I am new to triggers and need help on the following:

    I have a hourly table that inserts new rows every hour but I need to either Insert or Update the daily table with the sum of the reading from the hourly table. If a row exist in the daily table with the date of the hourly table, then I need to update this row but if it doesn't exist, I need to insert this row.

    Thanks for any suggestions...

    Alan

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Trigger to Insert or Update 2nd Table

    What DBMS? Sounds like you should be using a materialized view (snapshot).

  3. #3
    Join Date
    Mar 2004
    Posts
    5
    Thanks for replying, I have since moved this thread to the Microsoft SQL Server forum after posting to wrong forum. The DBMS is SQL2000

    Thanks...
    Alan

Posting Permissions

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