Originally posted by sweta naidu:
select (max(cast(employer_num as bigint)) + 1) as NextNum from Employer where client_id = 97 and isNumeric(employer_num) = 1
this statement works in sql but hibernate is throwing exception like ( expected before).
How are you calling your SQL? Hiberante use will of course be expecting HQL unless you explicitly tell it to run SQL.