How to search a base64 clob image from Java in a Oracle DB?

30 pts.
Tags:
Java
Oracle
Oracle Database
Sybase
I retrieve a very long string image in base 64 and need to search for duplicates in another database. How can I do that?

Software/Hardware used:
java,oracle, sybase

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Subhendu Sen
    Probably this is Java and Oracle as a back-end database. What piece of code did you write now? If you wrote the code for inserting image in a database then obviously you have written the code for searching. If yes, is there any error when you run this one? Is this a project/single piece of code? Are you working as a team member?
    116,460 pointsBadges:
    report
  • wilarz89
    It is different because I insert the clob files using oracle sql commands but need to retrieve and process the information using java.
    Right now I have a ORA-00932 error : expecting - got CLOB.
    Thanks for the help.
    30 pointsBadges:
    report
  • carlosdl
    The most reliable way of doing it would probably be using the COMPARE function in the DBMS_JOB package.

    Other options, if making a partial comparison was acceptable, would include grouping by a substring of the CLOB (using DBMS_LOB.substr) or by a hash of the CLOB (using DBMS_CRYPTO.Hash).
    84,535 pointsBadges:
    report
  • wilarz89
    How can I do the same with Java code? Will a Select with like validation work?
    30 pointsBadges:
    report
  • carlosdl
    You don't need Java code to do it. You need SQL code, which then will be called from Java.
    84,535 pointsBadges:
    report
  • carlosdl
    I would suggest looking up those functions and play with them directly (using SQL*Plus or SQL Developer). After you have a working example you can go to your Java application to call it from there.
    84,535 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: