3 Replies Latest reply: Oct 24, 2006 4:25 PM by jschellSomeoneStoleMyAlias RSS

    sqlserver date insert question

    807598
      Hi All

      I use SQLServer 2005
      I use JDBC to insert values into database.
      My date is like this...


      Release Date is:10/25/2006


      SQL:
      insert into releases(appid, releasedate) values(?,
      to_date(?,'MM/dd/yyyy'))


      I can get this to work in oracle. However in SQLServer 2005 I get this
      exception..


      com.microsoft.sqlserver.jdbc.SQLServerException: 'to_date' is not a
      recognized built-in function name.
      at
      com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unkno?wn
      Source)
      at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown
      Source)


      How do I change SQL. Please let me know.


      Thanks