We're updating the issue view to help you get more done. 

SQLServer2005Dialect: pagination query fails if terminating with a semicolon

Description

Following query using using pagination:

1 2 String sql ="select id from Product2 order by id;"; session.createSQLQuery( sql ).setFirstResult( 2 ).setMaxResults( 2 ).list();

throws SQLServerException: Incorrect syntax near ';'

Indeed it is working, when not using pagination feature.
Pullrequest will follow asap...

Environment

SQLServer2005, SQLServer2008, SQLServer2010

Status

Assignee

Lukasz Antoniak

Reporter

Guenther Demetz

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.1.4

Priority

Trivial