Re: SQL Question...

From: Colin Fraser <cfraser_at_korma.chilli>
Date: 11 Nov 1994 08:24:21 GMT
Message-ID: <39v9nl$m6s_at_pheidippides.axion.bt.co.uk>


In article 1134808479E_at_newshost.lanl.gov, allan_at_apple.com (Allan Marcus) writes:
>I'm kinda new to Oracle, so please don't kill me if this is too easy!
>
>I have two identicle tables. each table contains a LONG column. I want to
>copy the data from table A to table B. Here's what I tried:
>
>insert into B select * from A
>
>Unfortuantely, I get a "ORA-00997: Illeage use of LONG datatype" error message.
>
>So, how can I move the data?

Had a similar requirement lately (Oracle V6). The simple solution was to use PL/SQL.

        define a cursor returning all columns of B         

	copy the LONG into a variable of type CHAR(32767) (max length permitted I
	think)
	
	then use a FOR loop to process the cursor, copying the LONG into your variable,
	and using INSERT into A.

This works but, of course, you're limited to the max CHAR length for your LONGS.

As far as I know the only alternative is Pro-C or whatever.

Good Luck,

Colin Fraser   Received on Fri Nov 11 1994 - 09:24:21 CET

Original text of this message