Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert long in either create table or insert

708631Jun 2 2016 — edited Jun 2 2016

I setup sql developer to pull data from postgresql databases.

I setup database links to the postgre db's.

I need to pull in some data from a table and either insert into local table in oracle or create new oracle table from select ,but 2 columns are coming in as long.

I created a view from the original select :

create view HEALTH_MONITOR_VW as

"select

"park_key",

"tur_key",

"sys_number",

"tur_name",

"status",

"last_update",

"s_status"

from  "schema"."health_monitor"@PostgreSQL30"

desc HEALTH_MONITOR_VW ;

Name              Null Type          

----------------- ---- --------------

park_key           NUMBER(10)    

tur_key            NUMBER(10)    

sys_number          NUMBER(10)    

tur_name           NVARCHAR2(250)

status             LONG          

last_update        DATE          

s_status           LONG          

-----------

CREATE TABLE health_mon

(

  park_key integer,

  tur_key integer,

  sys_number integer,

  tur_name varchar(250),

  status clob,

  last_update varchar(25),

  s_status clob

);

insert into health_mon

select

"park_key",

"tur_key",

"sys_number",

"tur_name",

"status",

"last_update",

"s_status"

from HEALTH_MONITOR_VW;

SQL Error: ORA-00997: illegal use of LONG datatype

i have tried on both status columns to use to_lob() but that didnt work.

Tried creating columns as varchar, same thing, dont work. any suggestions ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2016
Added on Jun 2 2016
10 comments
513 views