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 > scripts with table name variable DB2 UDB V8

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-22-04, 05:27
pjcompi pjcompi is offline
Registered User
 
Join Date: Jul 2004
Posts: 2
Question scripts with table name variable DB2 UDB V8

Hi,

Running on windows 2000. I am designing an archiving process which will run daily against 1 of 31 tables that store a days worth of data. The process exports to a file with a select, loads the file into a monthly table and then loads a dummy file to the daily to empty it.
Rather than write seperate scripts for each I am trying to generically create the export command into a file using the day portion of current date and then executing that file.
The problem is that I am getting a ';' in the 1st character of the generated file. I need to ether find a way of preventing this or to run a batch edit via some OS command to remove it.
Any ideas or sugestions will be much appreciated.

Many thanks
Pete
Reply With Quote
  #2 (permalink)  
Old 07-22-04, 08:59
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
You can put all your commands in the script/batch file and use

db2 -td@ -f <file_name>

Here the statement termintor is @

regards,

mujeeb
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