Solved

SQL Server 2012 - Incorrect syntax near '44446'.

Posted on 2014-03-27
2
2,512 Views
Last Modified: 2014-03-31
Hello all,

I'm trying to run this simple UPDATE statement on a SQL Server 2012 and I keep getting an error that reads:

Msg 102, Level 15, State 1, Procedure category_UTrig, Line 9
Incorrect syntax near '44446'.


The statement is as follows:

"update category set CatConveyorStoreNumber=0
where CatConveyorStoreNumber is null"

The CatConveyorStoreNumber is a SmallInt field.

The database that I'm trying to modify came from a SQL server 2008, where it runs without any problems.

Any ideas?
0
Comment
Question by:CASorter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Berkson Wein earned 500 total points
ID: 39959244
I would look for a procedure called category_UTrig

Based on its name, that is likely a procedure that is run after your update because of an update trigger on the category table.

Seems like there's a syntax error there.  Look for 44446 there, which is a strange thing to have in a procedure, but I can't speak to the business logic.

If you're still stumped, show us the category_UTrig stored procedure code.

Hope this helps.
1
 
LVL 34

Expert Comment

by:ste5an
ID: 39959245
You have a trigger after update or instead of update on [category] which is erroneous. So take a look at it.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

729 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