Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: Date Change

    How does this look? 🙂

    Declare @DayInterval INT;

    Set @DayInterval = Datediff(day,(select MAX(dviendtime) from PrmDeviceVisit),GetDate());

    Update dbo.PrmDeviceVisit

    Set DviEndTime = DATEADD(DAY,@DayInterval,DviEndTime)

    Update dbo.PrmDeviceVisit

    Set DviStartTime = DATEADD(DAY,@DayInterval,DviStartTime)

  • RE: Date Change

    I don't know how to do that, I'm very new at SQL, I only basic select statements etc... that's why I'm here to get the exact method...

  • RE: Date Change

    I want to modify the data in the existing table not place it in a temp table...do a direct modification to all records so the data is current and not...

  • RE: 1st Trigger Attempt

    Believe me it works, I tested it, I had a database with 121 entries in the PrmMilkVisit table of all 0's, I simply entered a dry off date for 1...

  • RE: 1st Trigger Attempt

    Figured it out, thanks for pointing me in the right direction, I just right clicked the triggers in the remlactation table and clicked on new trigger, followed the step by...

  • RE: 1st Trigger Attempt

    Lowell,

    I get the following error:

    Msg 207, Level 16, State 1, Procedure TR_PrmMilkVisitExample1, Line 20

    Invalid column name 'LacId'.

    Msg 207, Level 16, State 1, Procedure TR_PrmMilkVisitExample1, Line 20

    Invalid column name 'LacId'.

    When trying...

  • RE: 1st Trigger Attempt

    I simply want to monitor the dbo.RemLactation table on the 2 columns and when there is a change then run my script, the script searches the dbo.PrmMilkVisit table and when...

Viewing 7 posts - 1 through 7 (of 7 total)