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 > Informix > Unload in a stored procedure.. Please help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-12-03, 12:03
M2001 M2001 is offline
Registered User
 
Join Date: Jan 2003
Posts: 14
Question Unload in a stored procedure.. Please help

Hi,

I'm unable to execute an UNLOAD statement within Informix Stored Procedure.

Is there a way around this ?

Thanks in advance.
__________________
M2001
Reply With Quote
  #2 (permalink)  
Old 02-12-03, 15:40
eherber eherber is offline
Registered User
 
Join Date: Aug 2002
Location: Bonn/Germany
Posts: 152
You can't use the unload-statement directly in
a stored procedure because it is not an SQL
statement.
So you might call a dbaccess batch-script which does
the unload thru 'system' inside the stored procedure.

However this is not very reliable way because of
the poor error handling capabilities of stored
procedures for such things.

I would recommend that you use a scripting language like
Perl or Python for doing this. These languages are both
available on NT and provide excellent features for
dealing with directories and files.

The stored procedure approach will also work, but maybe
not as reliable as needed.


Best regards

Eric
--
IT-Consulting Herber
WWW: http://www.herber-consulting.de
Email: eric@herber-consulting.de

***********************************************
Download the IFMX Database-Monitor for free at:
http://www.herber-consulting.de/BusyBee
***********************************************
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