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 > UDB 8.2 Command Editor - How do you redirect results to a file?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-05, 11:10
Razor1973 Razor1973 is offline
Registered User
 
Join Date: Jul 2004
Posts: 53
Question UDB 8.2 Command Editor - How do you redirect results to a file?

In version 7, you could go File | Options and redirect the query results to a text file instead of showing them on the screen. How do you do that with version 8?
Reply With Quote
  #2 (permalink)  
Old 01-07-05, 01:33
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
command editor

and : selected -> export
gives you the possibility to export data in different formats ?
Best Regards, Guy Przytula
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 01-07-05, 08:12
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
To save the Result Set in V8.1, from the "Results" tab, select Query Results -> Save Data.

Andy
Reply With Quote
  #4 (permalink)  
Old 01-07-05, 10:17
Razor1973 Razor1973 is offline
Registered User
 
Join Date: Jul 2004
Posts: 53
Quote:
Originally Posted by przytula
and : selected -> export
gives you the possibility to export data in different formats ?
Best Regards, Guy Przytula
Unfortunately, no good.

What if I have 2 million rows returned by my query and the Command Editor only shows me 100 at a time? Do I have to hit "Fetch More Rows" 20,000 times before I can export? When you export, you only export what's being displayed (I tried). The alternative would be to change the number of rows displayed and disable filtering, doing the export and then going back to 100 returned and 500 for filtering or something like that every time you do an export.

Regardless, on top of that what if I don't want to export in DEL format, forced to have a column delimiter, but, instead, I want a columnar output like the one I could get in version 7? Something I can e-mail just as is and people can print and read just as is?
Reply With Quote
  #5 (permalink)  
Old 01-07-05, 10:18
Razor1973 Razor1973 is offline
Registered User
 
Join Date: Jul 2004
Posts: 53
Quote:
Originally Posted by ARWinner
To save the Result Set in V8.1, from the "Results" tab, select Query Results -> Save Data.

Andy
Where is that "Save Data"? I am at the Query Results tab and don't see any button or menu option that says "Save Data."
Reply With Quote
  #6 (permalink)  
Old 01-07-05, 10:41
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
IBM seems to have changed how the "Command Center" in V 8.1 now "Command Editor" in V8.2 works in this area. What I suggest you do is this.

Get the query the way you want it. Then issue an EXPORT command based on that query.

Andy
Reply With Quote
  #7 (permalink)  
Old 01-07-05, 11:01
Razor1973 Razor1973 is offline
Registered User
 
Join Date: Jul 2004
Posts: 53
That's almost the same thing as doing an export once you get the results, although it does save you the continuous fetching. However, it still does not export in a columnar way, the way version 7 used to? That is:

FIELD1··FIELD2··FIELD3
-------·-------·-------
12345···ABCDE···67890
65······A·······56
5665····CRE·····46576


Instead, the closest you can get to this would be DEL (without column headers, to top it off):

12345,ABCDE,67890
65,A,56
5665,CRE,46576


I really wonder why IBM should give me some new features and take away some that were quite useful.
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