Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  create function to unload data

    Posted Thu July 06, 2023 05:02 AM

    Hi, anyone here knows if i can create function that can loop to unload data? since as far as i know, stored-procedure cannot do the looping for unload data. Thanks



    ------------------------------
    nasiha zailan
    ------------------------------


  • 2.  RE: create function to unload data

    Posted Thu July 06, 2023 06:06 AM

    In case you're talking UNLOAD statement, that's not going to fly since UNLOAD is pure dbaccess syntax, i.e. only dbaccess understands and handles it, not the server.

    I think you could use "external tables" for your purpose, though.



    ------------------------------
    Andreas Legner
    ------------------------------



  • 3.  RE: create function to unload data

    Posted Thu July 06, 2023 06:12 AM

    https://docs.deistercloud.com/content/Databases.30/IBM%20Informix.2/Tips/Non%20blocking%20DBExport.xml?embedded=true



    ------------------------------
    Davorin Kremenjas
    ------------------------------



  • 4.  RE: create function to unload data

    Posted Thu July 06, 2023 08:43 AM

    Yes. You can unload data using a stored procedure. You just cannot use the UNLOAD verb since that is not an SQL command but a dbaccess built-in command.

    You can create an external table and have the proc copy data to that with a simple

     SELECT ... FROM source_table

    INSERT INTO external_table;



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 5.  RE: create function to unload data

    Posted Fri July 07, 2023 01:37 AM
    https://www.oninitgroup.com/faq-items/load-and-unload-functions


    This e-mail (and any files or other attachments transmitted with it) is intended solely for the attention of the addressee(s). Unauthorised use, disclosure, storage, copying or distribution of any part of this e-mail is not permitted. If you are not the intended recipient please destroy the e-mail, remove any copies from your system and inform the sender immediately by return. Oninit Consulting Ltd does not accept any liability or responsibility for any damage caused by any malware transmitted by this e-mail or for changes made to this e-mail after it was sent. All communications to or from Oninit Consulting Ltd may be automatically logged, monitored and/or recorded in order to secure the effective operation of the system and for other lawful purposes. The views or opinions contained within this e-mail may not necessarily reflect those of Oninit Consulting Ltd.