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!

Query "LONG" variable using select

697309May 5 2009 — edited May 6 2009
Hi,

I am trying to fetch the data of the table in which one of the column is of type LONG. And i get the below error:
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG BINARY

I tried this:
set long 20000
But of no use.

My DB version is 10g R2 on RHEL 4AS.
Query used is:
set long 20000
select field1,field2,field3,field4,field5,field6,field7 from <table>;

Table looks like this:
Name Null? Type
----------------------------------------- -------- ----------------------------
field1 NOT NULL LONG RAW
field2 NOT NULL VARCHAR2(50)
field3 NOT NULL NUMBER(10)
field4 NOT NULL VARCHAR2(255 CHAR)
field5 NOT NULL VARCHAR2(128)
field6 NOT NULL VARCHAR2(512)
field7 NOT NULL VARCHAR2(1024)

Any help appreciated.

Thanks,
Ramya
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 3 2009
Added on May 5 2009
5 comments
384 views