Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to insert data in LOBs

Re: How to insert data in LOBs

From: Saurabh Sharma <saurabhs_at_fcsltd.com>
Date: Fri, 09 Feb 2001 04:50:18 -0800
Message-ID: <F001.002B0244.20010209040450@fatcity.com>

thanks it worked fine. but how if i want to insert some file(text,word) or some image file to a blob.
and i did'nt understood how to querry such table with LOBs.

thanks again for the guidance.

saurabh

If you use CLOB, you can insert text in the same way as with varchar2. If you have BLOB, you'll probably need the function utl_raw or dbms_lob. However with BFILE, you should create a directory with the stmt: CREATE DIRECTORY and insert using BFILENAME expression. Then you have the function EMPTY_BLOB() or EMPTY_CLOB to set them without a value.

An example

SQL> desc kk

 Nombre                                    żNulo?   Tipo
 ----------------------------------------- --------
----------------------------
 A                                                  CLOB
 B                                                  BLOB

SQL> r
  1 insert into kk
  2* values ('PUMAS',utl_raw.cast_to_raw(' are the best rugby team'))

1 fila creada.

Regards.

> -----Mensaje original-----
> De: Saurabh Sharma [SMTP:saurabhs_at_fcsltd.com]
> Enviado el: jueves 8 de febrero de 2001 14:32
> Para: Multiple recipients of list ORACLE-L
> Asunto: How to insert data in LOBs
>
> hi all,
> i want to know how to insert values i.e. text/word or images
> in a table's LOB column.
> can we insert them with the regular insert command.
> please help in this regard.
> thanks in advance..
>
> saurabh
> FCS Software Solutions Ltd.
> Noida.(India)
> saurabhs_at_fcsltd.com

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Trassens, Christian
  INET: CTrassens_at_uni2.es

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Saurabh Sharma
  INET: saurabhs_at_fcsltd.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Feb 09 2001 - 06:50:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US