java - TO_TIMESTAMP in Insert Statement String -


I am creating an Oracle insertion statement in Java and I need to include the timestamp given below. Works below, but I want to make it more dynamic Is there another way to make TO_TIMESTAMP in addition to hardcoding in my inclusion string?

  string sqlStmt = "insert in table (date_create); sqlStmt + =" TO_TIMESTAMP ('2008-03-17 21:43 43: 58.000000', 'YYYY-MM-DD HH24: MI : SSFF ') ";    

Both Java and SQL developers provide you with bind variables (Date_create1) '

Now you only have one timestamp parameter date_create1. To create and pass it.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -