-
Hiiiiiii,any one can help me how to export the single table data from the sql prompt in sunsolaris with oracle9i.
I am using telnet.
soon
thanks
kavitha
kavitha
-
hai as far as i know,
if you want to export data from one table to another existing table of same structure then can do
SQL > insert into table2 select * from table1
if you want to export data from one table to another non existing table then can do
SQL > create table table2 as select * from table1
-
hiii,i need to export into textfile.
thanks
kavitha
-
to a text file means,
u got to use UTL_FILE Package.
or else try this. I haven't
spool
select * from table1
-
-
Hope this helps you, there may be someother way also.
declare
v_type utl_file.file_type;
field1 number(10);
field2 varchar(20);
cur c1 is select * from table1;
begin
v_type=utl_file.fopen('pathname','filename','a',5000);
--a -append mode
--5000 -- buffersize
for curs in c2 loop
field1:=curs.f1;-- first field
field2:=curs.f2; -- second field
utl_file.put_line(v_type,field1||','||field2);
end loop;
utl_file.fclose_all;
end;
hopethis helps.i know this basic thing.I tried out this long before.
[Edited by sona on 06-18-2002 at 07:42 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|