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: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 06 Nov 2006 10:02:20 -0800
Message-ID: <1162836141.55132@bubbleator.drizzle.com>


Eitan M wrote:

> What if I use LONG in DB, and it is almost imposible to change
> (standard program that create LONGS, and not LOBS, and lot of customers).
> Isn't any function to convert LONG to LOB (or to VARCHAR2 if I know it has 
> only characters) , so I can use it normally.
> 
> Besides, I didn't understand what DBMS_CRYPTO is related to my question ?
> 
> Thanks :)
> 
> "Vladimir M. Zakharychev" <vladimir.zakharychev_at_gmail.com> wrote in message 
> news:1162804916.721934.169330_at_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

Please do not top post.

There is a demo for converting LONG to CLOB in Morgan's Library at www.psoug.org.

Convert now if you can. Oracle has deprecated the LONG data type.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Nov 06 2006 - 12:02:20 CST

Original text of this message

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