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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Trigger in a certain period of time of day

Trigger in a certain period of time of day

Scheduled Pinned Locked Moved Database
databasetutorialquestion
3 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.
  • U Offline
    U Offline
    User 4700810
    wrote on last edited by
    #1

    Hi all, I have two tables A(a1,a2,a3), B(b1,b2,b3) and a period of time Delta t [t1,t2]. When it is between t1 - t2 of time, if there is a row inserted in table A, the field b1 of table B will be updated such as b1=b1+1. Moreover, I also have a web application which can assign value for t1, t2 through an aspx page. Could you tell me how to do that? Thank kiu so much.

    _ 1 Reply Last reply
    0
    • U User 4700810

      Hi all, I have two tables A(a1,a2,a3), B(b1,b2,b3) and a period of time Delta t [t1,t2]. When it is between t1 - t2 of time, if there is a row inserted in table A, the field b1 of table B will be updated such as b1=b1+1. Moreover, I also have a web application which can assign value for t1, t2 through an aspx page. Could you tell me how to do that? Thank kiu so much.

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      If you are using SQL Server, you could set up a trigger on table a, so when a row is inserted it checks if the time is between t1 and t2, and if so update table b.

      I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

      U 1 Reply Last reply
      0
      • _ _Damian S_

        If you are using SQL Server, you could set up a trigger on table a, so when a row is inserted it checks if the time is between t1 and t2, and if so update table b.

        I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

        U Offline
        U Offline
        User 4700810
        wrote on last edited by
        #3

        Could you give me an example because I do not know how to assign value for t1 & t2? Thank kiu!

        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