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

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

    squishy

      Hello,
      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 []
      ie
      select * from foo where foo.[4_a_prinzip] = 1


      is there a way to tell jboss to do so?

      thanks in advance