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!

Selecting a CLOB in SQL*Plus

CeritoAug 23 2016 — edited Aug 23 2016

I have a humungous select statement stored in A.A_VAL_T. When I try to select the CLOB, I always get only 80 lines.  I need to retrieve the whole select statemnt in SQL*Plus.  Is that possible?  I ultimately want to pass the select from a bash shell to sql*plus.  I'm inexperienced with CLOB.  I've only worked with LONG data types in the past.

SQL> desc a
Name                                      Null?    Type
----------------------------------------- -------- -------------
A_APLN_T                               NOT NULL VARCHAR2(126)
A_KY_ID                                NOT NULL VARCHAR2(255)
A_VAL_T                                         CLOB
A_REC_MTN_TS                           NOT NULL DATE
A_REC_MTN_ID                           NOT NULL VARCHAR2(8)

SQL> SELECT a_val_t AS clob_col
  2  --    INTO x
  3  FROM a
  4  WHERE a_apln_t = 'TimeSlice' AND a_KY_ID = 'EDW';

CLOB_COL
--------------------------------------------------------------------------------
SELECT TO_CLOB(

This post has been answered by John Spencer on Aug 23 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2016
Added on Aug 23 2016
5 comments
768 views