HQL query not working, Incorrect syntax near ',' error. Using Spring and Hibernate?

First of all: It will help you a lot. Second: String SQL_UPDATE_QUERY = "update Order set orderStatus=completed where orderStatus=closed and account.profile. UserId=:userId"; and then use addString("userId",userId); May be these changes will help you to eliminate problem.

Added that property but don't know why its not showing queries. – Sagar May 11 at 12:09 please show us your SQL queries. – danny.

Lesnik May 11 at 12:12 "update Order set orderStatus=completed where orderStatus=closed and account.profile. UserId='"+userID+"'"; This query I want to execute. – Sagar May 11 at 12:40 @Sugar, this is HQL query, and what about SQL query?

You shoul enable hibernate.show. Sql and then see original SQL query in console. – danny.

Lesnik May 11 at 12:45 ya I enabled that but it is not showing sql query. – Sagar May 117 at 7:19.

I not sure but try to escape Order by backticks (for MySQL) or double quotes (for PostgreSQL) or similar. If your query uses as raw SQL then database may recognize it as reserved keyword (like ORDER BY).

You are missing the quotes in this one String SQL_UPDATE_QUERY = "update Order set orderStatus=completed where orderStatus=closed and account.profile. UserId='"+userID+"'"; Shouldn't it actually be String SQL_UPDATE_QUERY = "update Order set orderStatus='completed' where orderStatus='closed' and account.profile. UserId='"+userID+"'"; Quotes for all orderStatus expressions.

That too not working, tried both way. – Sagar May 12 at 7:19.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions