Solved

SQL Server 2012 - Incorrect syntax near '44446'.

Posted on 2014-03-27
2
2,303 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
2 Comments
 
LVL 15

Accepted Solution

by:
weinberk 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
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.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now