Solved

SQL Server 2012 - Incorrect syntax near '44446'.

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

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

746 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

12 Experts available now in Live!

Get 1:1 Help Now