APS NZ
asked on
Help with SQL Server query syntax
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")>
<CFQUERY NAME="MyQuery" DATASOURCE="JobOrder#Sfx#" >
UPDATE Applic_Temp_Group.dbo.Temp EmployeesF ile
INNER JOIN TsheetsThisWeek ON TempEmployeesFile.UniqueVa l =TsheetsThisWeek.UniqueVal
SET TempEmployeesFile.Wkg ='Yes'
WHERE TsheetsThisWeek.WEnded=<CF QUERYPARAM Value="#WeekDate#" CFSQLTYPE="CF_SQL_DATE">
</CFQUERY>
It crashes and says "Incorrect syntax near the keyword INNER". What is the correct syntax I need?
<CFSET WeekDate=MakeODBCDate("12/
<CFQUERY NAME="MyQuery" DATASOURCE="JobOrder#Sfx#"
UPDATE Applic_Temp_Group.dbo.Temp
INNER JOIN TsheetsThisWeek ON TempEmployeesFile.UniqueVa
SET TempEmployeesFile.Wkg ='Yes'
WHERE TsheetsThisWeek.WEnded=<CF
</CFQUERY>
It crashes and says "Incorrect syntax near the keyword INNER". What is the correct syntax I need?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER