How to view clob data using sql

Hi,
In our database, we have one table that is having one column of CLOB datatype but now i want to view the data using sql select query but it throws error: "Datatype not supported".
Could any one please let me know how to view the clob data using select query.
Oracle DB version : 10.2.0.3
Thanks

h5.
use read procedure
PROCEDURE READ (
lobsrc IN BFILE|BLOB|CLOB ,
amount IN OUT BINARY_INTEGER,
offset IN INTEGER,
buffer OUT RAW|VARCHAR2 );
example  Updating LOB by Using DBMS_LOB in PL/SQL
DECLARE
lobloc CLOB; -- serves as the LOB locator
text VARCHAR2(32767):='Resigned: 5 August 2000';
amount NUMBER ; -- amount to be written
offset INTEGER; -- where to start writing
BEGIN
SELECT resume INTO lobloc
FROM employees
WHERE employee_id = 405 FOR UPDATE;
offset := DBMS_LOB.GETLENGTH(lobloc) + 2;
amount := length(text);
DBMS_LOB.WRITE (lobloc, amount, offset, text );
text := ' Resigned: 30 September 2000';
SELECT resume INTO lobloc
FROM employees
WHERE employee_id = 170 FOR UPDATE;
amount := length(text);
DBMS_LOB.WRITEAPPEND(lobloc, amount, text);
COMMIT;
END;

Similar Messages

  • View CLOB data in SQL Developer

    Hi,
    Can anyone let me know how to view CLOB data in SQL Developer 2.1.
    I am having images stored in a column of datatype CLOB. How to view this image.
    Database is 10.2.0.4.

    Since SQL Developer has no idea about the type of data stored in LOB columns, one cannot view that content in desired format.
    You need a tool to extract the LOB data and render it accordingly.
    BTW, do you mean BLOB here?

  • How to view alerlog contents using SQL?

    How to view alertlog contents using SQL?

    Hi,
    Why don't you use the OEM Database Console ?? Now, in order to view the contents of the alert log file using a SELECT statement, you need to create a external table:
    create or replace
    directory background_dump_dest_dir
    as '<your_oracle_home>/bdump';
    CREATE table alert_log_external
    (line varchar2(4000) )
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY background_dump_dest_dir
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    nobadfile
    nologfile
    nodiscardfile
    FIELDS TERMINATED BY '#$~=ui$X'
    MISSING FIELD VALUES ARE NULL
    (line)
    LOCATION ('alert_<sid_of your_database>.log') )
    REJECT LIMIT UNLIMITED;Cheers

  • How to export&import data using sql *loader

    Hi all,
    How to export&import data from sql*loader. Give me the clear steps..
    Thanks in Advance

    Hi did you already exported data from SQL SERVER? if not using SQL*LOADER you cannot export data. SQL*LOADER is only mean for importing data from flat files(usually text files) into ORACLE tables.
    for importing data into oracle tables using sql*loader use below steps
    1) create a sql*loader control file.
    it looks like as follows
    LOAD DATA
    INFILE 'sample.dat'
    BADFILE 'sample.bad'
    DISCARDFILE 'sample.dsc'
    APPEND
    INTO TABLE emp
    TRAILING NULLCOLS
    or for sample script of control file search google.
    2) at command prompt issue following
    $ sqlldr test/test
    enter control file=<give control file name which you create earlier>
    debug any errors (if occured)

  • Viewing CLOB data in sql developer

    In SQL Developer 1.1, if CLOB data was returned from a query, you could place your mouse over the column and get most of it.
    But in 1.2, all you get is "(CLOB) <some data> ...", and nothing else. Is there something I need to set?

    You should look in the SQL Developer forum. I think your question is answered here:
    How to view the entire CLOB in results table?
    Regards Nigel

  • How to view creation date using 'ls' command?

    Hi all,
    Anyone know how to get the 'ls' command to display creation date? When I do 'ls -la' I get the mod date, but cannot figure out how to view the creation date.
    Thanks!
      Mac OS X (10.4.2)  

    While there is NO way to do this as ls will only show the mod time there is using another program
    DL this HFSDebug.
    Running it on any file will display to you Create, Mod and access times. An example for you
    sudo hfsdebug /usr/local/bin/hfsdebug\ 2.04\ BETA\ G5
    path = Firefly:/usr/local/bin/hfsdebug 2.04 BETA G5
    # Catalog File Record
    type = file
    file ID = 20112378
    flags = 0000000000001010
    . File has a thread record in the catalog.
    . File has security data (ACLs).
    reserved1 = 0
    createDate = Wed Dec 14 00:57:14 2005
    contentModDate = Wed Dec 14 00:57:14 2005
    attributeModDate = Wed Dec 14 00:57:14 2005
    accessDate = Thu Dec 15 20:42:53 2005
    backupDate = Fri Jan 1 00:00:00 1904
    # BSD Info
    ownerID = 0 (root)
    groupID = 20 (staff)
    adminFlags = 00000000
    ownerFlags = 00000000
    fileMode = -rwxr-xr-x
    linkCount = 0
    textEncoding = 0
    attrBlocks = 0
    # Finder Info
    fdType = 0
    fdCreator = 0
    fdFlags = 0000000000000000
    fdLocation = (v = 0, h = 0)
    opaque = 0
    # Data Fork
    logicalSize = 121744 bytes
    totalBlocks = 30
    fork temperature = not a hot file
    clumpSize = 101 bytes
    extents = startBlock blockCount % of file
    0x362cd4 0x1e 100.00 %
    30 allocation blocks in 1 extents total.
    30.00 allocation blocks per extent on an average.
    # Resource Fork
    logicalSize = 0 bytes
    Enjoy!
    Peter
    PowerMac G5 DP 2.5Ghz   Mac OS X (10.4.3)  

  • View clob data is sql

    i have a column name "Description" with clob datatype.
    In one of the records, the 'description' has 5mb of text data.
    Is there a way to display the whole 5mb of data.
    Thanks in advance,
    Regards

    If you are using PL/SQL Developer its very easy to see the CLOB oblects just clicking ... button infront of that column .
    OR
    If you are using SQL*PLUS
    SET LONG 10000 -- to the size u want
    select col_clob from test
    Else
    set the offset LOBOFFSET from where u want to see the out put, 1 will give u the out put from begining
    SET LOBOFFSET 1
    Select col_clob from test

  • How to view /SAPAPO/ tables using SQL Studio question

    Hi,
    This is for Livecache 7.4 on AIX.
    I have installed a SQL Studio 7.6. When I logged using SUPERDBA/admin, I can only see tables owned by SUPERDBA, SYS, and DOMAIN.
    I cannot see any tables owned by SAP<LC Name>. I want to see details about table e.g. /SAPAPO/ORDKEY, which is owed by SAP<LC Name>.
    Is it possible to see it using SQL Studio?
    Please let me know if anybody has any idea about it.
    Regards.
    Sume.

    Hello Sume,
    If you would like to see details about table e.g. /SAPAPO/ORDKEY.
    =>
      Did you check the owner of this table?
    => You could check, for example, in LC10 -> liveCache:Monitoring
    -> Problem Analysis -> Tables/Views/Synonyms ->
       Database Object Schema           SAPLCT
       Name of Database Object          *
       < execute >
       & review if the table /SAPAPO/ORDKEY is listed.
    => If the table is listed, you should be able to run the select statement as SAPLCT user on this table.
    If you are sure that you was using the SAPLCT user, please
    Check if this user has application tables:
    < May be the password was changed from the default sap for the
    Standard liveCache user, you should know it. >
    dbmcli -d LCT -u control,control
    dbmcli on LCT>sql_connect SAPLCT,sap
    dbmcli on LCT> sql_execute select * from users
    dbmcli on LCT> sql_execute select * from users
    < I would like to see what DBA users you have in liveCche &
      when the SAPLCT user was created. >
    dbmcli on LCT>sql_execute select tablename from tables where owner='SAPLCT'
    < If the SAPLCT is the owner of the liveCche application tables,
      and the table /SAPAPO/ORDKEY will be listed. >
    dbmcli on LCT> sql_execute select * from tables where owner='SAPLCT'
    dbmcli on LCT> sql_execute select count(*) from "SAPLCT"."/SAPAPO/ORDKEY"
    < to get number of the entries in the table with owner - SAPLCT >
    dbmcli on LCT>exit
    You could also to check what user did you set for the LCA connection.
    And run //om16 transaction in the liveCache relevant client on the system
    to see the entries in the /sapapo/ordkey & /sapapo/ordmap in liveCache in this client.
    Question: What details you need about table /SAPAPO/ORDKEY?
              Do you have problems on your system?
    Thank you and best regards, Natlia Khlopina

  • How to view mdsplus data using labview

     I posted this question in the Labview board, but seems nobody replies it so far. I am not sure which board is the best place to post this question. So I just reposted here.  Thanks a lot.
    I am a newbie to Labview. I am trying to write some vi to view and write data to Mdsplus.  I have downloaded Mdsplus(labview), and can find the Mdsplus functions, like mdsconnect, mdsput, ect, in the Call Library Function vi. But I have no ideal of how to use it. I tried to use Mdsconnect function to connect to some machine, but it always gives me an error message like, Labview: An exception occurred within the external code called by a call library function node.......  I was searching for help documents on the internet, but couldn't find anything useful. Could you please help me for this problem?  If you have any example of such vi, or teach me how to do it, that would be very helpful. I am using Labview 8 (windows). I would greatly appreciate your help!  Looking forward for your reply.
    Solved!
    Go to Solution.

    oops,
    I didn't attach these correctly in the previous post.
    Greg
    Attachments:
    Example_Read_Write_MDS_Array.vi ‏25 KB
    Open_MDS_Shot2.vi ‏45 KB

  • How to see Chinese data using SQL Plus?

    Hi,
    Is it possible to see the Chinese character string saved in the database by using English version Sql Plus? The following data is set up in the table NLS_DATABASE_PARAMETERS in my oracle database. I'm really appreciated if anybody could help me.
    Thanks,
    Suwei Ma
    [email protected]
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET UTF8
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_RDBMS_VERSION 8.1.7.4.1

    Thanks for your repley. I don't think I need to change NLS_CHARACTERSET setup because I can load Chinese data into the database and also can see the data by running Chinese tool like NJStar Communicator. Therefore, I probably need to change the session level parameters, but not sure.

  • How to view complete date stamp in query result view in sql developer?

    Hi,
    In the query result, the date present in db is shown as DD-MM-YYYY format but I want to view the complete date stamp. When I view the same data in aqua data studio, I see the complete time stamp. Please let me know if I need to do some settings in Oracle SQL Developer so that complete date is shown?
    How to view complete date stamp in query result view in sql developer?
    Thanks in advance,
    Vineet

    864793 wrote:
    Hi,
    In the query result, the date present in db is shown as DD-MM-YYYY format but I want to view the complete date stamp. When I view the same data in aqua data studio, I see the complete time stamp. Please let me know if I need to do some settings in Oracle SQL Developer so that complete date is shown?
    How to view complete date stamp in query result view in sql developer?
    Thanks in advance,
    VineetAlternatively you can execute below
    set nls_date_format='DD-MM-YYYY HH24:MI:SS';Regards,
    Achyut K

  • How can I validate a date using sql

    How can I validate a date using sql or pl/sql
    select to_date('01/01/2009','mm/dd/yyyy') from dual this is a good date
    but how can I check for a bad date
    select to_date('0a/01/2009','mm/dd/yyyy') from dual
    Howard

    William Robertson wrote:
    It'll be complicated in pure SQL, as you'll have to parse out day, month and year and then validate the day against the month and year bearing in mind the rules for leap years. It would be simpler to write a PL/SQL function and call that.Nah, not that complicated, you just need to generate a calender to validate against.
    SQL> ed
    Wrote file afiedt.buf
      1  with yrs as (select rownum-1 as yr from dual connect by rownum <= 100)
      2      ,mnth as (select rownum as mn, case when rownum in (4,6,9,11) then 30
      3                            when rownum = 2 then 28
      4                       else 31
      5                       end as dy
      6                from dual
      7                connect by rownum <= 12)
      8      ,cent as (select (rownum-1) as cen from dual connect by rownum <= 21)
      9      ,cal as (select cen, yr, mn,
    10                      case when ((yr = 0 and mod(cen,400) = 0)
    11                             or (mod(yr,4) = 0 and yr > 0))
    12                            and mn = 2 then dy+1
    13                      else dy
    14                      end as dy
    15               from cent, yrs, mnth)
    16  --
    17      ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    18  --
    19  select case when cal.cen is null then 'Invalid Date'
    20              when not regexp_like(dt,'^[0-9]{1,2}[\/.-_][0-9]{1,2}[\/.-_][0-9]{4}$') then 'Invalid Date'
    21         else dt
    22         end as dt
    23  from dt left outer join
    24               cal on (to_number(regexp_substr(dt,'[0-9]+')) between 1 and cal.dy
    25                   and to_number(regexp_substr(dt,'[0-9]+',1,2)) = cal.mn
    26                   and floor(to_number(regexp_substr(dt,'[0-9]+',1,3))/100) = cal.cen
    27*                  and to_number(substr(regexp_substr(dt,'[0-9]+',1,3),-2)) = cal.yr)
    SQL> /
    Enter value for date_dd_mm_yyyy: a1/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select 'a1/02/2008' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 01/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '01/02/2008' as dt from dual)
    DT
    01/02/2008
    SQL> /
    Enter value for date_dd_mm_yyyy: 29/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '29/02/2008' as dt from dual)
    DT
    29/02/2008
    SQL> /
    Enter value for date_dd_mm_yyyy: 30/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '30/02/2008' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 29/02/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '29/02/2009' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 28/02/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '28/02/2009' as dt from dual)
    DT
    28/02/2009
    SQL> /
    Enter value for date_dd_mm_yyyy: 0a/01/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '0a/01/2009' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 00/01/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '00/01/2009' as dt from dual)
    DT
    Invalid Date
    SQL>

  • How to parsing xml data in sql statement??

    Hi friends, I have a table which contain column as clob ,stores in xml format, for example my column contain xml data like this
    <Employees xmlns="http://TargetNamespace.com/read_emp">
       <C1>106</C1>
       <C2>Harish</C2>
       <C3>1998-05-12</C3>
       <C4>HR</C4>
       <C5>1600</C5>
       <C6>10</C6>
    </Employees>
      Then how to extract the data in above xml column data using SQL statement...

    Duplicate post
    How to parsing xml data in sql statement??

  • How to load oracle data into SQL SERVER 2000?

    how to load oracle data into SQL SERVER 2000.
    IS THERE ANY UTILITY AVAILABLE?

    Not a concern for an Oracle forum.
    Als no need for SHOUTING.
    Conventional solutions are
    - dump the data to a csv file and load it in Mickeysoft SQL server
    - use Oracle Heterogeneous services
    - use Mickeysoft DTS
    Whatever you prefer.
    Sybrand Bakker
    Senior Oracle DBA

  • How to view plan data

    Helloo experts,
    I want to see the actuals and <b>plan</b> data for  given <b>costcenters/Internal</b> orders.
    I use T-code: KSB1 for viewing Actuals data. But, I dont know how to view Plan data. 
    What is the best way to look at it.

    Reddy,
    What do you mean by you want to check this data ? Well this is the data that was entered into SAP by some excel ( i am guessing) - So that's the data that was inputted into SAP.
    Do you have any other system where you do the planning and then load it into SAP ? If you want to compare with that - yes you can.
    If you are using BPS for planning, yes you can compare by preparing a report from the transactional infocube in BW ( which would hold the planning data) with this R/3 report.
    Hope that helps - Let me know if you need any other info.
    Thanks,
    Nandita

Maybe you are looking for

  • HT1339 My sons ipod classic has the music no longer has a menu!

    My son's ipod classic is completely blank and yet when I put it on to charge up it plays the music but you cannot select etc because there is no menu.  I connected it to my mac and tried to restore it but it says it could not be restored. An unknown

  • When I plug my iPhone in to charge it,it will not charge. Why?

    iPhone will not charge when plugged into wall adaptor but will charge to 30% when plugged into USB on computer but then starts to drop from the 30%. Why?

  • Downloading same app twice

    Is it possible to d/l the same app twice? (and pay twice of course). DH has discovered he loves angry birds but so do I, so I don't want him playing my game (lol) but when I tried to purchase again it says 'installed'. Is there any way around this? T

  • Can I upgrade my 2009 SSD HD to the 2010 model?

    I have an April 2009 MBP with the 120 GB SSD. I have heard that this is the same SSD that went in the Macbook Airs, and has slower read speeds (48 MB/s) than the current SSDs on the new MBPs. Question: Can I take my MBP to my Apple store and have the

  • Still Having BBC iplayer Issues

    Why is this happening on a 50mb Infinity 2 renewed supposedly unrestricted in any way connection using a wired connection? Is it BT or BBC? I ran the BBC speed test and it came back as fine.