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 > Exporting an .ixf flat file from a global temp table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-20-04, 10:33
robbierob69 robbierob69 is offline
Registered User
 
Join Date: Jul 2004
Location: Kansas
Posts: 5
Exclamation Exporting an .ixf flat file from a global temp table

I am needing to know if on a DB2 version 8 database,

Can I export a .ixf flat file from a global temporary table session??

If I can, what exactly is the syntax. Thanks
Reply With Quote
  #2 (permalink)  
Old 08-20-04, 10:41
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes, you can export, but you cannot import.

Syntax:
export to d:\arw.ixf of ixf messages d:\mess.out select * from session.fred

Andy
Reply With Quote
  #3 (permalink)  
Old 08-20-04, 10:58
robbierob69 robbierob69 is offline
Registered User
 
Join Date: Jul 2004
Location: Kansas
Posts: 5
What about if I am using a java program to run sql on a UNIX box. How can I incorporate the export process to export the file out. Currently, this is one export that I have, but it exports a .dat file

[INSERT]
!!TABLE NAME = SESSION.TEMP_PRICE_DOM
!!EXPORT = /markopt/data/
INSERT into
SESSION.TEMP_PRICE_DOM
SELECT distinct
'PAYLESSCORP',
'PAYLESS',
'1LT' || char(a.num_lt) as lot,
'LOT',
rtrim(char(a.num_co)) || '01S' || rtrim(char(a.num_str)) as store,
'STORE',
TIMESTAMP(@@DTWKE@@ - 6 days),CURRENT TIME),
' ',
CURRENT TIMESTAMP,
'A',
a.amt_unt_rtl,
TIMESTAMP('@@DTWKE@@',CURRENT TIME),
'ACTUAL PRICE',
'USD',
'REG'
FROM
session.domestic a;
Reply With Quote
  #4 (permalink)  
Old 08-20-04, 11:06
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You have a problem. Export is not SQL, it is a command and therefore cannot be executed through JDBC.

Andy
Reply With Quote
  #5 (permalink)  
Old 08-20-04, 11:42
robbierob69 robbierob69 is offline
Registered User
 
Join Date: Jul 2004
Location: Kansas
Posts: 5
Thanks for your help Andy, I think I can work around this somehow. I was just trying to get it all in one job instead of breaking it down to 2. Thanks though.

Rob
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