Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9223419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:04:34+00:00 2026-06-18T04:04:34+00:00

I am trying to insert into Oracle Database using JDBC prepared statement. Below is

  • 0

I am trying to insert into Oracle Database using JDBC prepared statement. Below is the sql that I am trying to insert.

And everytime I get sql exception for below SQL

private static String insertSQL = "INSERT INTO USER_COPY (ID, CREATION_DATE, LAST_MODIFIED_DATE) VALUES ('123456789', TO_TIMESTAMP('2013-02-01 12:37:40.315'), TO_TIMESTAMP('2013-02-01 12:37:40.315'))";

Exception

unrecognized token '(' in values list, expecting ')'

Table Properties

ID is String
CREATION_DATE timestamp
LAST_MODIFIED_DATE timestamp

Anything wrong with my SQL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:04:36+00:00Added an answer on June 18, 2026 at 4:04 am

    I wonder if perhaps it’s not your timestamp format? This worked for me using TO_TIMESTAMP:

    CREATE TABLE USER_COPY (ID int, CREATION_DATE TimeStamp, LAST_MODIFIED_DATE TimeStamp);
    
    INSERT INTO USER_COPY (ID, CREATION_DATE, LAST_MODIFIED_DATE)
    VALUES ('123456789',
            TO_TIMESTAMP('2013-02-01 12:37:40.315', 'YYYY-MM-DD HH24:MI:SS.FF'), 
            TO_TIMESTAMP('2013-02-01 12:37:40.315', 'YYYY-MM-DD HH24:MI:SS.FF')
            );
    

    And here is the SQL Fiddle.

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to insert 315K Gif files into an Oracle 10g database. Everytime I get
I am trying to insert values into Oracle 10g database using the code below
I am trying to insert into my database table using the database helper class.
Trying to insert a large audio file into an Oracle 10g database and keep
I am trying to insert a record into an Oracle database I have a
I an trying to INSERT multiple rows into an SQL, Oracle table though SQL
I am trying to insert a record into an oracle database and the code
Hi I am developing a database in Oracle SQL dev, that is trying to
I am trying to insert some values into Oracle DB from Java using the
I'm trying to insert a data into oracle database(version 11g xe).But when i'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.