Unload from function instead of Select statement
Posted in 2005
Topics: SQL Development & Query Writing, Migration, Import/Export & Data Conversion, Versions, Editions & End-of-Life, Jobs, Consulting & Announcements
IDS 9.4FC3 HPUX 11 I want to cron an unload nightly that unloads the results of a "return with resume" function instead of a basic "select x from y where z". The function returns both multiple columns as well as multiple rows. Is this possible and what is the syntax? I have looked at the manual for UNLOAD and it doesn't show any reference to being able to do this. I looked up table, set, row, multiset, etc. but not sure if these are for this type of situation. Thanks, Randy
1. Create a stored procedure with the select clause, cursor with resume and returning all the fields. 2. In the cron call the stored procedure. Hope it helps. Kannan Thirugnanam -----Original Message----- From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org] On Behalf Of Kennedy, Randy Sent: Thursday, March 31, 2005 2:28 PM To: ids@iiug.org Subject: Unload from function instead of Select statement [4650] IDS 9.4FC3 HPUX 11 I want to cron an unload nightly that unloads the results of a "return with resume" function instead of a basic "select x from y where z". The function returns both multiple columns as well as multiple rows. Is this possible and what is the syntax? I have looked at the manual for UNLOAD and it doesn't show any reference to being able to do this. I looked up table, set, row, multiset, etc. but not sure if these are for this type of situation. Thanks, Randy
SQLCMD
has for some time provided: UNLOAD TO "file" EXECUTE PROCEDURE
whatnot("with","your","choice","of","args");
Download it at the IIUG Software Archive.
I just checked and it appears that DB-Access does not support this, nor
does it handle OUTPUT with EXECUTE -- unless I've not read the right part
of the manual (which is a possibility - I was getting syntax errors, but
they were DB-Access generated -809 errors rather than server-generated
-201 errors.
--
Jonathan Leffler (jleffler@us.ibm.com)
STSM, Informix Database Engineering, IBM Information Management Division
4100 Bohannon Drive, Menlo Park, CA 94025
Tel: +1 650-926-6921 Tie-Line: 630-6921
"I don't suffer from insanity; I enjoy every minute of it!"
"Kennedy, Randy" <RKennedy@scottsdaleaz.gov>
Sent by: forum.subscriber@iiug.org
03/31/2005 11:27 AM
To
ids@iiug.org
cc
Subject
Unload from function instead of Select statement [4650]
IDS 9.4FC3
HPUX 11
I want to cron an unload nightly that unloads the results of a "return
with
resume" function instead of a basic "select x from y where z". The
function
returns both multiple columns as well as multiple rows.
Is this possible and what is the syntax? I have looked at the manual for
UNLOAD and it doesn't show any reference to being able to do this. I
looked
up table, set, row, multiset, etc. but not sure if these are for this type
of situation.
Thanks,
Randy