Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6543907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:24:09+00:00 2026-05-25T11:24:09+00:00

I am generating the sql statement below based on some coldfusion logic, but it

  • 0

I am generating the sql statement below based on some coldfusion logic, but it is erroring and I can’t seem to find the cause, I have tried making many different modifications to it and nothing seems to be helping.

UPDATE MAIN_RECORDS 
SET JONUM = NULL, 
SET CUSTNAME = 'Super Sweet Name', 
SET CONTACTDT = 02/28/2011, 
SET ENGRECDT = 03/07/2011, 
SET HOW_WR_DT = 03/07/2011, 
SET COMM_DT = 03/29/2011, 
SET FACAVALDT = NULL, 
SET FAX_SUPDT = 03/07/2011, 
SET LINENUM = 'CLPRO L6', 
SET POLENUM = 'CLPRO 125 T T3', 
SET REASON = '03/07/11 NO VAC FAC THIS IS THE WRONG INFORMATION IT WAS ON HERE TWICE', 
SET REC_TYPE = 'H', 
SET ORDER_TYPE = 'P', 
SET CANCEL_ORDER = 'Y', 
SET State_abbr = 'IL', 
SET dbfk_state = 17, 
SET xx_streetnumber = '2626', 
SET xx_street = 'Fake St', 
SET xx_city = 'NEWTON', 
SET xx_class_of_service_ind = 'R', 
SET xx_cellphone_ind = '1', 
SET xx_assigned_phone = '3045653897', 
SET xx_exchange_name = 'NEWTON', 
SET XX_new_ref_code = '60', 
SET xx_new_service_type = '11', 
SET ORD_COMDT = 03/11/2011, 
SET delivery_date = NULL 
WHERE ordernum = '08824112' AND exchnum = '304565' 

Currently the error that management studio is giving me is:

Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'SET'.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:24:10+00:00Added an answer on May 25, 2026 at 11:24 am

    You only need 1 SET statement, instead of the multiple ones you have.

    Also, your dates need to have single quotes around them.

    e.g.:

    UPDATE MAIN_RECORDS 
    SET JONUM = NULL, 
        CUSTNAME = 'Super Sweet Name', 
        CONTACTDT = '02/28/2011', 
        ENGRECDT = '03/07/2011', 
        HOW_WR_DT = '03/07/2011', .....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have below variables try to make an auto generating SQL statement in python
Do you have any tricks for generating SQL statements, mainly INSERTs, in Excel for
Does anyone have a technique for generating SQL table create (and data insert) commands
I'm generating T-SQL SELECT statements for tables for which I have no data type
I have the following SQL statement in a legacy system I'm refactoring. It is
Still wrapping my head around SQL and PHP, but hope someone can help with
I have a working process, behind a web application, that is generating some records
I'm currently generating SQL insert statements from more than one tables, and in the
I am generating a reports using SQL Reporting services 2005. I need to protect
How do I do sorting when generating anonymous types in linq to sql? Ex:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.