This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
How to get the starting position of a string using hibernate query. For example we will use �patindex� to get the position of the string in sqlserver. It will return an integer value based on the starting position of the given string .
There is nothing in HQL that matches this. You could use T-SQL directly, since Hibernate supports the use of platform-specific SQL (see the createSQLQuery method) however this would break portability. Doing the work in your application via Java might be the best way though.