Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to get data from clob data type ?

Posted on 2014-11-17
1
Medium Priority
?
298 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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 setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

721 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