2 Replies Latest reply: Jun 25, 2012 10:27 AM by 510477 RSS

    Error when insert data in Sql Server table(DateTime data type)

    FahedAkhter
      Hello all,

      I have created a database link in oracle 11g to SQL Server 2008 using Sqlserver gateway for oracle,Oracle run on Linux and SQL Server run on Windows platform.

      I have queried a table and it fetches rows from the target table.

      I am using this syntax for insert a row in Sql Server table.

      Insert into Prod@sqlserver (NUMITEMCODE, NUMPREOPENSTOCK, NUMQNTY, NUMNEWOPENSTOCK, DATPRODDATE , TXTCOMPANYCODE, "bolstatus", NUMRESQNTY )
      Values (1118 , 1390.0 , 100.0 ,1490 , '2012-06-23 12:37:58.000','SFP' ,0 , 0 );

      but it give me error on DATPRODDATE,The data type of DATPRODDATE column in Sql Server is DATETIME.

      My Question is how can i pass the date values in INSERT statement for Sql Server DateTime data type.

      Regards