Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.

ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Download and Activate to enter!

Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.


Tutorials
| Forums

Download to Enter
| Contest Rules

DOWNLOAD INTEL® GPA FOR FREE

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:
  #1  
Old April 24th, 2002, 05:25 PM
bvillepc bvillepc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Bartlesville, OK
Posts: 88 bvillepc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 9 m 47 sec
Reputation Power: 11
Exclamation Oracle SELECT INTO OUTFILE problem

Hello, I am using Oracle and trying to output the returned query data to a TAB Delimited file. I tried using

"SELECT columns FROM tables INTO OUTFILE 'dir/filename.txt' FIELDS TERMINATED BY '\t' WHERE conditions"

But Oracle just gives the Error:
"Warning: OCIStmtExecute: ORA-00905: missing keyword"

Am I doing this incorrectly or does Oracle just not support it, or is there another way to send the data to a file? I am currently sending it to an outfile by looping through each row, storing it in a variable, and then writing it to a file, but it takes quite a while, since the query returns a LOT of data. Thanks in advance.

-Chris C.

Reply With Quote
  #2  
Old April 25th, 2002, 05:12 PM
tron's Avatar
tron tron is offline
SwollenMember
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: the master control
Posts: 263 tron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 14 m 6 sec
Reputation Power: 12
here is what i have done when i need to output a query to a tab delimited file. basically just use the spool command. if you really want to get crazy...put the following into a shell script:


. /etc/profile
ORACLE_SID=<instancename>;export ORACLE_SID
. oraenv

sqlplus name/pass << EOF

SET LINESIZE 500 FEEDBACK OFF TRIMSPOOL ON TERMOUT OFF HEAD OFF PAGESIZE 0 term off

SPOOL /directory/name/outputfile.dat

SELECT TO_CHAR(id) || chr(9) || name || chr(9) || type
FROM tbl_something;

SPOOL OFF

EXIT;
EOF

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Oracle SELECT INTO OUTFILE problem


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap