Solved

How to get data from clob data type ?

Posted on 2014-11-17
1
277 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
1 Comment
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

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 …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now