SQL update w/ multiple parameters

SQL update w/ multiple parameters

Post by Robert Sim » Thu, 07 Feb 2008 12:19:23

What is wrong with the following update statement. I receive the following
error: Syntax error in UPDATE statement.

UserSession.adoCmd.CommandText := 'UPDATE Project_Setup1 SET
[Contract_Number, ' +
'Contract_Type, Award_Date, Start_Date, Estimated_Completion_Date,
Task_Order_Number, '+
'OpNum, Site_City, Site_State, Site_Zip] = :Contract_Number,
:Contract_Type, ' +
':Award_Date, :Start_Date, :Estimated_Completion_Date,
:Task_Order_Number, ' +
':OpNum, :Site_City, :Site_State, :Site_Zip WHERE Project_Number =

Any help would be greately appreciated.

-Robert Sims

SQL update w/ multiple parameters

Post by Helmut Woe » Thu, 07 Feb 2008 16:29:06

Am Tue, 5 Feb 2008 21:19:23 -0600 schrieb Robert Sims:

you have:
update table set field1, field2, ... = value1, value2,... where ...
but an update statement normally looks like:
update table set field1=value1, field2=value2,... where ...

you see the difference ?