Re: Trigger doing UNLOAD to file OR calling Store Procedure doing the
Posted in 2000
Dario Rossa wrote:
>
> Hi,
>
> I don't if its possible to do the following on Informix 7.30 NT I get a SQL
> ERROR -201, probably wrong version or syntax error.
> Is this supported on IDS2000 ?
>
> create trigger TGU_getrws
> UPDATE of statcond ON COM_RWS_LST
> REFERENCING NEW AS val
> FOR EACH ROW WHEN(val.statcond = 'L')
> (UNLOAD TO 'D:\\data\\blabla' DELIMITER '|' SELECT statid from COM_RWS_LST
> WHERE statcond = 'L')>
> OR
>
> create trigger TGU_getrws
> UPDATE of statcond ON COM_RWS_LST
> REFERENCING NEW AS val
> FOR EACH ROW WHEN(val.statcond = 'L')
> (EXECUTE PROCEDURE P_tst_rws())>
> CREATE PROCEDURE P_tst_rws()
> ...
> UNLOAD TO 'D:\\data\\blabla' DELIMITER '|' SELECT statid from> COM_RWS_LST WHERE statcond = 'L'
> END PROCEDURE;
>
> Thanks for any comment on this
No, UNLOAD is not an SQL command, it is a built-in function in the isql,
i4gl/r4gl & dbaccess products.
Why don't you INSERT the records into another table and UNLOAD them at
your leisure?
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |This email will self-destruct in |/// / ////|
| |10 sec. If you received this email |// / /////|
| |in error, sorry about the mess. |/ ////////|
+----------------------+-----------------------------------+-----------+