Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting long value

Re: Getting long value

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 6 Nov 2006 01:21:56 -0800
Message-ID: <1162804916.721934.169330@k70g2000cwa.googlegroups.com>

Eitan M wrote:
> Hello,
> I want to compare two LONG columns in a specific table (Oracle 8i).
> Maybe by the CRC code for the LONG column.
>
> Is there any function that convert the LONG column to CRC string ?
> Also I want to know which byte makes the difference.
> Is there any other solution for the above ?
>
> Thanks :)

The easiest solution is to take Oracle recommended approach: convert all LONGs to LOBs in your db and never use LONGs again (see the docs about the transition, it's covered in big detail there.) LOBs are much easier to work with, there's DBMS_LOB.COMPARE function that can compare two LOBs or equally sized parts thereof, and there's DBMS_CRYPTO.HASH in 10g, which can MD5 or SHA-1 a LOB. Getting positions where the difference starts and ends is not possible using OOTB functionality afaik, but you can try to use a BDE implementation in Java for this if you can find one.

Hth,

    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)     http://www.dynamicpsp.com Received on Mon Nov 06 2006 - 03:21:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US