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 6739605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:30:31+00:00 2026-05-26T11:30:31+00:00

String s1 = create table testing + (id number NOT NULL PRIMARY KEY, +

  • 0
    String s1 = "create table testing " +
          "(id number NOT NULL PRIMARY KEY, " +
          "url varchar(1000) NOT NULL, " +
          "urlHash varchar(1000) NOT NULL, " +
          "contentHash varchar(1000), " +
          "modDate date, " +
          "contentLocation varchar(1000), " +
          "status integer, " +
          "lastCrawlDate date) ";
String s2 = "create sequence " +sequenceName+ " start with 1 increment by 1 nomaxvalue";

stmt=conn.createStatement();
stmt.executeUpdate(s1);
stmt.executeUpdate(s2);

What’s wrong with this below merge statement I always get error as

Missing IN or OUT parameter at index:: 8

I am trying to convert String date time to Date dataType in oracle sql in prepare statment

ps =  conn.prepareStatement(
"MERGE INTO testing " +
"USING (  SELECT ? AS url, " +      // We will maybe add this record
"                ? AS urlHash, " +
"                ? AS contentHash, "+
"        TO_DATE(?, 'YYYY-MM-DD'T'HH24:MI:SS'Z'') AS modDate, "+
"        ? AS contentLocation, "+
"        ? AS status, "+
"      TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') AS lastCrawlDate "+
"           FROM dual ) maybe "+
"   ON (maybe.urlHash = testing.urlHash) "+
"       WHEN MATCHED THEN "+
// We only need update the fields that might have changed
"       UPDATE SET testing.contentHash     = maybe.contentHash, "+
"                  testing.modDate         = maybe.modDate, "+
"                  testing.contentLocation = maybe.contentLocation, "+
"                  testing.status          = maybe.status, "+
"                  testing.lastCrawlDate   = maybe.lastCrawlDate "+
// But only if the new record is more recent
"        WHERE TO_CHAR(testing.modDate, 'YYYY-MM-DD'T'HH24:MI:SS'Z'') < TO_CHAR(maybe.modDate, ''YYYY-MM-DD'T'HH24:MI:SS'Z''') "+
"       WHEN NOT MATCHED THEN "+
// Insert new URL record
"   INSERT VALUES (test_seq.nextval, maybe.url, maybe.urlHash, maybe.contentHash, maybe.modDate, maybe.contentLocation, maybe.status, maybe.lastCrawlDate)");


    ps.setString (1, "http://www.computergeeks.com");
    ps.setString (2, "ahsasoiowiewie");
    ps.setString (3, "sgasjwhwueybdbfndf");
    ps.setString (4, "2011-07-28T23:54:14Z");
    ps.setString (5, "c://");
    ps.setLong (6, 0);
    ps.setString (7, "2010-09-24 23:34:14"); 
    ps.executeUpdate();
    ps.close();
  • 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-05-26T11:30:32+00:00Added an answer on May 26, 2026 at 11:30 am

    The date format in your first TO_DATE call is no good — you’re trying to use single quotes inside a single-quoted string, so it ends up not being enclosed properly. Probably this is giving the parser fits, resulting in a not very sensible error message.

    In an Oracle date format, the literal bits need to be enclosed in double quotes, not single:

    select TO_DATE('2011-07-28T23:54:14Z', 'YYYY-MM-DD"T"HH24:MI:SS"Z"') from dual;
    

    You need to embed the format 'YYYY-MM-DD"T"HH24:MI:SS"Z"' in your SQL statement. Make sure you escape the double quotes properly so they don’t terminate the Java string.

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

Sidebar

Related Questions

I have a procedure that requires a string as input CREATE PROCEDURE testing(MYVAR VARCHAR)
I have a string like following: CREATE GLOBAL TEMPORARY TABLE some_temp_table_name or CREATE GLOBAL
I'm trying to create a dictionary type - ie hash table with a string
If I had the following table. create_table :my_table, :id => false do |t| t.string
Typical way of creating a CSV string (pseudocode): Create a CSV container object (like
If I create a String with [NSString StringWithFormat], do I have to [retain] it?
I would like to create a String.replaceAll() method in JavaScript and think using a
How do I create a string so that it formats floating point numbers to
I want to create a string in JavaScript that contains all ascii characters. How
i want to create a string S , which can be used as an

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.