mysql - Convert SQL-query with CAST() to HQL -


please me write hql query following sql query:

select max(cast(substring([columnname], 6) unsigned))+1  [tablename]  distrcode = [(value)]; 

i cannot try myself, searching around found these probable solutions:

solution 1

select max(cast(substring([columnname], 6) unsigned integer))+1 

solution 2

select max(cast(substring([columnname], 6) integer))+1 

maybe can try both , report back, 1 worked.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -