Solved

How to get data from clob data type ?

Posted on 2014-11-17
1
294 Views
Last Modified: 2014-11-24
Hi All,
i am using oracle 11g  1.2.1.0

i have below table
CREATE TABLE TABLE1
  (
    EMP_ID NUMBER NOT NULL ENABLE,
    NAME CLOB
  )

Open in new window


 INSERT INTO TABLE1 VALUES(1,'thomos');

Open in new window

 
 
  Now below is my query
 
  select DBMS_LOB.SUBSTR(NAME,1,4000) AS DESCRIPTION from TABLE1;
 
  output: i am getting as null
expexted: thomos

Regards
Thomos
0
Comment
Question by:deve_thomos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 40447634
check the docs for the syntax of dbms_lob.substr:
https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lob.htm#i999349

If is AMOUNT then OFFSET.  If is backwards from regular SUBSTR.

select DBMS_LOB.SUBSTR(NAME,4000,1) AS DESCRIPTION from TABLE1;
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question