0 Replies Latest reply on Apr 12, 2006 7:35 AM by Holger Johanndeiter

    Number is first char in column name leads to error (MSSQL)

    Holger Johanndeiter Newbie

      I have to use an old and big database in my application and it is best if i don't change anything like column names and stuff.
      Problem is, someone named a column "4_a_prinzip". Now if hibernate queries that table i get the following error:

      Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near '.4'.

      in order to make it work the column name would have to be surrounded by []
      select * from foo where foo.[4_a_prinzip] = 1

      is there a way to tell jboss to do so?

      thanks in advance