Solved

SQL Server 2012 - Incorrect syntax near '44446'.

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

628 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