Solved

How to get data from clob data type ?

Posted on 2014-11-17
1
288 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't Access My Database 57 77
Oracle - Query link database loop 8 41
Creation date for a PDB 5 39
Error querying database link from Oracle 10g to Postgresql 7 69
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

830 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