Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 19th, 2004, 04:08 AM
YuLing YuLing is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 44 YuLing User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to YuLing
Cannot extract a too large text file??

Hi guys

I would like to extract a table that contain a LOTS of values to a text file, but it says that the file cannot be extracted cos it is too large.

So my question is whether there is a way to divide the large table into...say 4 parts and then select each part into 4 different text file.

Example:
Let say that a table have 1,000,000 rows
Is there a way to select the first 250,000 rows into the 1st text file and then in the 2nd text file select the next 250,000 rows....and so on

Or do anyone have any better idea to extract a very large text file?

Thanks.

Reply With Quote
  #2  
Old May 19th, 2004, 07:59 AM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
Hi,

you can try and do this from utl_file (i'm not sure there is a limit to the size of the file other than what the system impose).

Galit.

Reply With Quote
  #3  
Old May 19th, 2004, 01:41 PM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
The following is not a permanent but a temporary solution.

for example you want to use the same approach on EMP table.

create a view with rownum column as follows

CREATE OR REPLACE VIEW view_emp
AS SELECT empno,ename,sal,mgr,job,hiredate,deptno,rownum row_count
FROM emp
/

now use this view to fetch the record by limiting number of rows.

SELECT * FROM emp
WHERE row_count BETWEEN 1 AND 10
/

SELECT * FROM emp
WHERE row_count BETWEEN 10 AND 100
/

Reply With Quote
  #4  
Old May 19th, 2004, 01:43 PM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
Sorry, use view in SELECT statement

SELECT * FROM view_emp
WHERE row_count BETWEEN 1 AND 100
/

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Cannot extract a too large text file??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway