Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: BLOB, CLOB
"Daniel A. Morgan" <damorgan_at_exesolutions.com> wrote in message news:<3CD5318E.B08C61CE_at_exesolutions.com>...
> Niall Litchfield wrote:
>
> > look into dbms_lob which will allow you to do this .
> >
> > --
> > Niall Litchfield
> > Oracle DBA
> > Audit Commission UK
> > "Simon Walchshofer" <simon.walchshofer_at_students.uni-linz.ac.at> wrote in
> > message news:3cd530d1_at_news.uni-linz.ac.at...
> > > Hi!
> > >
> > > Is it possible to insert for example a picture into a table with one
> > > sql-insert statement?
> > >
> > > e.g.
> > > create table myLob (id number, picture clob);
> > >
> > > insert into myLob values (1, ??????????);
> > >
> > > Is there a possibility to specify the file-path directly in the
> > > insert-statement??
> > >
> > > THX
> > > Simon
> > >
> > >
>
> Please correct me if I am wrong but it is not possible, DBMS_LOB, or not.
> Every time I have gotten it to work I have inserted a row with an
> EMPTY_BLOB() reutrning ROWID and then locked it then updated it with the
> image.
>
> I would be interested in seeing an example that bypasses that requirement.
>
> Daniel Morgan
Daniel,
I would suggest creating a procedure that the external file containing the BLOB or CLOB is passed and then use the DBMS_LOB package to do the insert work behind the covers. That way it is a single call. However, I agree, there is no one liner without creating a package, that will insert into a BLOB or CLOB. I have an example application that shows the technique if anyone is interested, just email me.
Mike Received on Mon May 06 2002 - 09:12:58 CDT