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

Home -> Community -> Usenet -> c.d.o.server -> Re: Table Creation with a Long Variable

Re: Table Creation with a Long Variable

From: Peter Chan <chanp_at_nortel.ca>
Date: Tue, 04 Aug 1998 15:29:18 -0400
Message-ID: <35C7610E.4268@nortel.ca>


You have to use the copy command.

My syntax could be off, but I hope you get the jest of it.

To do this, is a little convulated, but it worked for me.

  1. Create a database link back to your own database.

   create public database link mylink
   connect to user
   identified by password
   using 'myalias';

2. Create a temporary table with the identical columns as the table

   you would like to dublicate.

   create table mytable_temp (
     long_text long
   );

3. Then do the copy.

   set arraysize 100
   set copycommit 100
   set long 20000
   copy from user/password_at_mylink insert mytable_temp (long_text)    using select long_text from mytable;

   mytable - is the existing table    mytable_temp - is the new table

I hope this helps.

mhalpeth_at_my-dejanews.com wrote:
>
> Hiya !
>
> Is there a way to create a table from a table which has a long variable ..as :
>
> Create table temp2
> as
> select * from temp1
> where col1 .....
>
> where the temp1 table has a long variable ... !! It displays the error
> message : ORA-00997: illegal use of LONG datatype
>
> Any ways to get around this ...!!
>
> Cheers !
>
> Mahesh
> Pls Cc : to mashy_at_null.net , TA
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

--



PETER CHAN, Northern Telecom
PHONE: (613) 763-9096 FAX: (613) 763-4408 EMAIL: chanp_at_nortel.ca
Received on Tue Aug 04 1998 - 14:29:18 CDT

Original text of this message

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