If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 and Information Integrator

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-13-04, 14:06
canada1 canada1 is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
DB2 and Information Integrator

Hello

I am a relative DB2 novice and I am experiencing some problems outputting query results to a delimited file. The query set I am returning includes 15+ attributes and approximately 20,000 records. After reading up on the DB2 documentation I tried to use the EXPORT session functionality from a command prompt via:
db2 export to filename.del of del .... select ...
however my select statement is far to long.

The second method would be to follow a successful method I've been using for smaller queries. An example would be:
db2 +o -tvf filename.sql -r filenameoutput
Unfortunately this format doesn't easily display output files with many attributes:

I would greatly appreciate if someone knows a way via a command prompt to:
1.Read in an .sql file
2.Output the query result set to a delimited file


Thanks
Reply With Quote
  #2 (permalink)  
Old 01-13-04, 14:32
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: DB2 and Information Integrator

Quote:
Originally posted by canada1

however my select statement is far to long.

How long is too long? Obviously, it does not exceed the DB2 sql statement size limit since you are able to execute it from a file...

Therefore, I assume you're hitting the OS command line length limit. There's nothing that prevents you from putting the entire EXPORT command into a script file and executing it the same way you do it with your SELECT statement...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On