HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to Avoid SQLPlus output truncating

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
truncatingoutputavoidhowsqlplus

Problem

I have the following column in oracle database table.

Column name : objectdata
Data type : LONG RAW


When I query this column via sqlplus output is like below.

SQL> select objectdata from tableA where login_id = 'xxxxxxxx';
O
-
A


This should be actually

Objectdata
----------------------
ACED0005737200136A617661... (very long value)


I have tried
set long 10000 SET PAGESIZE 32766 SET LINESIZE 32766 etc. Still it shows as truncated. How to get this value without truncated?

Solution

FAQ: LONGS and LONG RAW Columns (Doc ID 1022030.6)

-
How can you view LONG and LONG RAW data?

You can view LONG and LONG RAW data using OCI,PRO*C,
FORM4.0 and 4.5 GUI, pl/sql.
LONG RAW cannot be viewed using sqlplus, sqldba.

LONG RAW

Note: SQL*Plus is unable to SELECT a LONG RAW column, you have to
write your own program (in C, Java, VB, PHP or whatever supports OCI
or OO4O).

Meaning, it can not be displayed directly, you need to process or convert it to something else.

Context

StackExchange Database Administrators Q#314858, answer score: 3

Revisions (0)

No revisions yet.