Solved

SQL Server 2012 - Incorrect syntax near '44446'.

Posted on 2014-03-27
2
2,430 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 33

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

733 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