Re: INFORMIX Database Triggers
Posted in 1997
--------------D2BE57D679F588C7FB5449CE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
twilde@nwrfc.noaa.gov wrote:
> i'd like to use triggers to update table(s) that reside in database2,
> but
> have the triggering action occur when new data is inserted into a
> table
> in database1.
>
> can anyone help with the sql syntax to do this?
>
> -------------------==== Posted via Deja News
> ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Of course you can do that.
If you want to access another database, you may write sql statement as
follows.
"databasename@servername:tablename"
So in trigger, you can apply it.
For example,
create trigger trig1
update of col1 on tab1
referencing...........
for each row(insert into db2@server2:tab2 values .............);
Just try! Good luck.
--
**********************************************************************
SI Business Team/S/W Dept./Sales Dev.
Daou Technology Inc.
6F,DaeAh Bldg.,707-7,Yuksam-Dong Kangnam-Gu,Seoul,Korea
Tel: 82-2-3450-4673(Dir.) 82-2-3450-4500(Rep.) Fax: 82-2-555-0141
mailto:duckskim@daou.co.kr
--------------D2BE57D679F588C7FB5449CE
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
twilde@nwrfc.noaa.gov wrote:
<BLOCKQUOTE TYPE=CITE>i'd like to use triggers to update table(s) that
reside in database2, but
<BR>have the triggering action occur when new data is inserted into a table
<BR>in database1.
<P>can anyone help with the sql syntax to do this?
<P>-------------------==== Posted via Deja News ====-----------------------
<BR> <A HREF="http://www.dejanews.com/">http://www.dejanews.com/</A>
Search, Read, Post to Usenet</BLOCKQUOTE>
Of course you can do that.
<BR>If you want to access another database, you may write sql statement
as follows.
<BR> "databasename@servername:tablename"
<BR>So in trigger, you can apply it.
<BR>For example,
<BR> create trigger trig1
<BR> update of col1 on tab1
<BR> referencing...........
<BR> for each row(insert into <B>db2@server2:tab2</B>
values .............);
<P>Just try! Good luck.
<BR>--
<BR>**********************************************************************
<BR>SI Business Team/S/W Dept./Sales Dev.
<BR>Daou Technology Inc.
<BR>6F,DaeAh Bldg.,707-7,Yuksam-Dong Kangnam-Gu,Seoul,Korea
<BR>Tel: 82-2-3450-4673(Dir.) 82-2-3450-4500(Rep.) Fax: 82-2-555-0141
<BR><A HREF="mailto:duckskim@daou.co.kr">mailto:duckskim@daou.co.kr</A>
<BR> </HTML>
--------------D2BE57D679F588C7FB5449CE--