Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Oracle only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
Oracle
using clob
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
sinner
New Member
Join Date:
Mar 2008
Posts:
15
#1
using clob
Mar 3 '08, 04:44 AM
hi.
i want the code or reference for insert command using the CLOB datatype.
debasisdas
Recognized Expert
Expert
Join Date:
Dec 2006
Posts:
8119
#2
Mar 3 '08, 06:00 AM
Please find a related article
here
.
Comment
Post
Cancel
sinner
New Member
Join Date:
Mar 2008
Posts:
15
#3
Mar 3 '08, 06:19 AM
Originally posted by
debasisdas
Please find a related article
here
.
thanks for the reference
Comment
Post
Cancel
subashsavji
New Member
Join Date:
Jan 2008
Posts:
93
#4
Mar 4 '08, 06:44 AM
Originally posted by
sinner
hi.
i want the code or reference for insert command using the CLOB datatype.
[code=oracle]
create table demo
( id int primary key,
theClob clob
)
/
create or replace directory my_files as 'C:\';
/
CREATE OR REPLACE procedure load_a_file( p_id in number,
p_filename in varchar2 )
as
l_clob clob;
l_bfile bfile;
begin
insert into demo values ( p_id, empty_clob() )
returning theClob into l_clob;
l_bfile := bfilename( 'MY_FILES', p_filename );
dbms_lob.fileop en( l_bfile );
dbms_lob.loadfr omfile( l_clob, l_bfile,
dbms_lob.getlen gth( l_bfile ) );
dbms_lob.filecl ose( l_bfile );
end;
/
EXECUTE load_a_file(2,' YY.TXT');
[/code]
Last edited by
amitpatel66
;
Mar 4 '08, 07:12 AM
.
Reason:
code tags
Comment
Post
Cancel
sinner
New Member
Join Date:
Mar 2008
Posts:
15
#5
Mar 5 '08, 05:54 AM
Originally posted by
subashsavji
[code=oracle]
create table demo
( id int primary key,
theClob clob
)
/
create or replace directory my_files as 'C:\';
/
CREATE OR REPLACE procedure load_a_file( p_id in number,
p_filename in varchar2 )
as
l_clob clob;
l_bfile bfile;
begin
insert into demo values ( p_id, empty_clob() )
returning theClob into l_clob;
l_bfile := bfilename( 'MY_FILES', p_filename );
dbms_lob.fileop en( l_bfile );
dbms_lob.loadfr omfile( l_clob, l_bfile,
dbms_lob.getlen gth( l_bfile ) );
dbms_lob.filecl ose( l_bfile );
end;
/
EXECUTE load_a_file(2,' YY.TXT');
[/code]
thanks for the code
regards
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment