none
Updating Table with System Date RRS feed

  • Question

  • Hello: 

    My question is very simple:

    I have a column named "DateProcessed". Whenever User Clicks a Button, the column should be updated for each row with the current System.Date. 

    Here is my code:

    update dbo.JobStatus SET DateShipTransmitProcessed = ???? WHERE JobTableId = @JobTableId
    
    What should go in ????. Thanks for your help!

    Wednesday, December 15, 2010 9:27 PM

Answers

  • update dbo.JobStatus SET DateShipTransmitProcessed = GetDate() WHERE JobTableId = @JobTableId
    
    

    Best Wishes, Arbi --- Please vote if you find this posting was helpful or Mark it as answered.
    • Marked as answer by klm9971 Monday, December 20, 2010 9:55 PM
    Wednesday, December 15, 2010 9:29 PM

All replies

  • update dbo.JobStatus SET DateShipTransmitProcessed = GetDate() WHERE JobTableId = @JobTableId
    
    

    Best Wishes, Arbi --- Please vote if you find this posting was helpful or Mark it as answered.
    • Marked as answer by klm9971 Monday, December 20, 2010 9:55 PM
    Wednesday, December 15, 2010 9:29 PM
  • declare @now smalldatetime

    select @now = getdate()

    update dbo.JobStatus SET DateShipTransmitProcessed = @now WHERE JobTableId = @JobTableId


    Ali Hamdar (alihamdar.com - www.ids.com.lb)
    Wednesday, December 15, 2010 9:43 PM