This is still not working for me !
I am using version 3.1.2
Change log says :
Code:
Changes in version 3.1 alpha 1 (24.06.2005)
------------------------------------
* [HHH-538] - length() function does not work in SQLServerDialect
Code inside SybaseDialect :
Code:
public SybaseDialect() {
super();
......
registerFunction( "len", new StandardSQLFunction("len", Hibernate.LONG) );
.....
registerFunction( "length", new StandardSQLFunction( "len", Hibernate.INTEGER ) );
.....
}
Still I am getting this exception :
Seems like "length" is not getting changed to "len" as it should be for SQLServerDialect (my dialect).
Code:
Exception in thread "AWT-EventQueue-2" org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select patientflo0_.ENC_ID as ENCOUNTER1_, patientflo0_.LAST_UPDATE_TIME as LAST2_, patientflo0_.VAR as VAR3_, patientflo0_.PARAMETER_VALUE as PARAMETER4_10_, patientflo0_.DELETED as DELETED10_ from patientflo patientflo0_ where and patientflo0_.VAR=1 and length(patientflo0_.PARAMETER_VALUE)>0]; nested exception is java.sql.SQLException: 'length' is not a recognized function name.
java.sql.SQLException: 'length' is not a recognized function name.
Shouldnt there be a line of code such as
registerFunction("len",new SQLFunctionTemplate("len(?1)");
in the dialect class!
regards
Prashant