Results 1 to 2 of 2
  1. #1
    shexe is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    71

    Now() function

    Good Morning - I need to insert a DateTime stamp in an update query. I know that I need the Now() function but I am not sure where and I keep syntax erroring out. The code is listed below, can someone please show me where?



    INSERT INTO IT_Staff_Allocation_Snapshot ( Scenario, TemplateOwner, Project, BudgetWorkbook, ResourceName, Correction, January, February, March, April, May, June, July, August, September, October, November, December, UpdatedDateTime )
    SELECT IT_Staff_Allocation_2010.Scenario AS Scenario, IT_Staff_Allocation_2010.TemplateOwner, IT_Staff_Allocation_2010.Project, IT_Staff_Allocation_2010.BudgetWorkbook, IT_Staff_Allocation_2010.ResourceName, IT_Staff_Allocation_2010.Correction, IT_Staff_Allocation_2010.January, IT_Staff_Allocation_2010.February, IT_Staff_Allocation_2010.March, IT_Staff_Allocation_2010.April, IT_Staff_Allocation_2010.May, IT_Staff_Allocation_2010.June, IT_Staff_Allocation_2010.July, IT_Staff_Allocation_2010.August, IT_Staff_Allocation_2010.September, IT_Staff_Allocation_2010.October, IT_Staff_Allocation_2010.November, IT_Staff_Allocation_2010.December, IT_Staff_Allocation_2010.UpdatedDateTime
    FROM IT_Staff_Allocation_2010;

    Thanks,
    shexe

  2. #2
    shexe is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    71
    Got it. See below.
    INSERT INTO IT_Staff_Allocation_Snapshot ( Scenario, TemplateOwner, Project, BudgetWorkbook, ResourceName, Correction, January, February, March, April, May, June, July, August, September, October, November, December, UpdatedDateTime )
    SELECT IT_Staff_Allocation_2010.Scenario AS Scenario, IT_Staff_Allocation_2010.TemplateOwner, IT_Staff_Allocation_2010.Project, IT_Staff_Allocation_2010.BudgetWorkbook, IT_Staff_Allocation_2010.ResourceName, IT_Staff_Allocation_2010.Correction, IT_Staff_Allocation_2010.January, IT_Staff_Allocation_2010.February, IT_Staff_Allocation_2010.March, IT_Staff_Allocation_2010.April, IT_Staff_Allocation_2010.May, IT_Staff_Allocation_2010.June, IT_Staff_Allocation_2010.July, IT_Staff_Allocation_2010.August, IT_Staff_Allocation_2010.September, IT_Staff_Allocation_2010.October, IT_Staff_Allocation_2010.November, IT_Staff_Allocation_2010.December, Now() AS UpdatedDateTime
    FROM IT_Staff_Allocation_2010;

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need help with IIF function
    By RazMan in forum Access
    Replies: 4
    Last Post: 10-28-2010, 12:07 PM
  2. Want function to get current function name
    By Davis DeBard in forum Programming
    Replies: 2
    Last Post: 08-13-2009, 05:02 AM
  3. Sum Function Help
    By newbie in forum Reports
    Replies: 3
    Last Post: 06-30-2009, 05:32 PM
  4. function key
    By marianne in forum Access
    Replies: 5
    Last Post: 05-14-2009, 01:26 AM
  5. Avg Function
    By hiker8117 in forum Access
    Replies: 3
    Last Post: 04-23-2009, 11:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums