Help with SQL Server query syntax

Posted on 2012-09-13
Last Modified: 2012-09-13
We are (finally) upgrading from MSAccess to SQL Server 2008 R2.  I am new to SQL Server.  I have the following query

<CFSET WeekDate=MakeODBCDate("12/08/2012")>

  UPDATE Applic_Temp_Group.dbo.TempEmployeesFile
  INNER JOIN TsheetsThisWeek ON TempEmployeesFile.UniqueVal =TsheetsThisWeek.UniqueVal
  SET TempEmployeesFile.Wkg ='Yes'
  WHERE TsheetsThisWeek.WEnded=<CFQUERYPARAM Value="#WeekDate#" CFSQLTYPE="CF_SQL_DATE">

It crashes and says "Incorrect syntax near the keyword INNER".  What is the correct syntax I need?
Question by:jdthedj
    LVL 25

    Accepted Solution

    UPDATE tef
      SET TempEmployeesFile.Wkg ='Yes'
      FROM Applic_Temp_Group.dbo.TempEmployeesFile tef
      INNER JOIN TsheetsThisWeek ON tef.UniqueVal =TsheetsThisWeek.UniqueVal
      WHERE TsheetsThisWeek.WEnded=<CFQUERYPARAM Value="#WeekDate#"
    LVL 3

    Author Closing Comment

    Thanks lwadwell - it works fine.  I can see I'm going to have lots of queries to recode!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them ( . I did keep the main js functions but made sever…
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now