473,626 Members | 3,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trigger not firing on update

hi,

Here's the scenario

1) I am running a DTS job to fetch some rows from Oracle
2) The job populates the Table A as step 1
3) Then it fires a update statement which updates the rows in Table B.

Here's the statement
UPDATE Table B SET
time = case when (select median from Table A where sno = sno and Table
A.stno=70 ) is null then time
else (select median from Table A where Table B.sno = Table A.sno and
Table A.sstno=70) end ,
end
WHERE EXISTS (select sstno from Table A where Table B.sno = Table
A.sno)

There is a trigger on table B which should fire as soon as the
value>15.

When I fire the update statement direcly with a higher value than it
fires the trigger.
update table B set time=17 where b.sno=1000
But not when the job runs...
I am puzzled.
Thoughts?

AJ

Feb 3 '06 #1
1 2885

<aj*****@hotmai l.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
hi,

Here's the scenario
One thought (w/o seeing the code for the trigger) is remember, triggers fire
once per TRANSACTION not per row affected.

So it may be firing and only acting on one row.


1) I am running a DTS job to fetch some rows from Oracle
2) The job populates the Table A as step 1
3) Then it fires a update statement which updates the rows in Table B.

Here's the statement
UPDATE Table B SET
time = case when (select median from Table A where sno = sno and Table
A.stno=70 ) is null then time
else (select median from Table A where Table B.sno = Table A.sno and
Table A.sstno=70) end ,
end
WHERE EXISTS (select sstno from Table A where Table B.sno = Table
A.sno)

There is a trigger on table B which should fire as soon as the
value>15.

When I fire the update statement direcly with a higher value than it
fires the trigger.
update table B set time=17 where b.sno=1000
But not when the job runs...
I am puzzled.
Thoughts?

AJ

Feb 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2480
by: Rolf Kemper | last post by:
Dear All, we are running SQL2000 Sever and make use of the xp_sendmail. For any reason the mail service can run into problems and it looks like that the statemnt below gets not finished. EXEC @Status = master..xp_sendmail @recipients=@TOList, @copy_recipients=@CCList,@subject='the subject goes here',@message=@MailText,@no_output=TRUE
9
3455
by: Martin | last post by:
Hello, I'm new with triggers and I can not find any good example on how to do the following: I have two tables WO and PM with the following fields: WO.WONUM, VARCHAR(10) WO.PMNUM, VARCHAR(10) WO.PROBLEMCODE, VARCHAR(8)
8
2932
by: Remove the obvious for replies | last post by:
I am using DB2 8.1.4 with SDE and Info Integrator. I am trying to create a trigger to populate a spatial table based on values from an attribute table. However, it appears to not recognize the CASE condition. Here's the trigger : create trigger MDA.TUA_AMNGROWNDIR after update of UTM8315N, UTM8315E on MDA.MNGROWNDIR referencing new as new_upd for each row mode db2sql
2
6989
by: Jack | last post by:
We are have a question about the no cascade option on before triggers. The description stays that no other triggers will be fired by the changes of a before trigger. One of our developers is seeing results that would imply that other after triggers are being fired by the results of a before trigger. Is this possible? Is there some little documented behavior going on here? thanks
2
3320
by: Net Virtual Mailing Lists | last post by:
Hello, If I have a rule like this: CREATE OR REPLACE RULE sometable_update AS ON UPDATE TO table2 DO UPDATE cache SET updated_dt=NULL WHERE tablename='sometable'; CREATE OR REPLACE RULE sometable_insert AS ON INSERT TO table2 DO UPDATE cache SET updated_dt=NULL WHERE tablename='sometable'; CREATE OR REPLACE RULE sometable_delete AS ON DELETE TO table2 DO UPDATE
1
6200
by: abhi81 | last post by:
Hello All, I have a table on which I have created a insert,Update and a Delete trigger. All these triggers write a entry to another audit table with the unique key for each table and the timestamp. Insert and Update trigger work fine when i have only one of them defined. However when I have all the 3 triggers in place and when i try to fire a insert query on the statement. It triggers both insert and update trigger at the same time and...
5
2621
by: danishahmed2007 | last post by:
i have a table of the format CREATE TABLE testing ( emp_name varchar(50), emp_id int, rec_up datetime DEFAULT (getdate()) ) and on the event of an update to any column in the table i want to
22
6601
by: DreamersDelight | last post by:
Hi, I'm stuck on this problem and I can't find a sollution. I'm going to try and explain this step by step. 1 After certain rows get updated with a certain value. I don't know wich rows in advance. And they do not have a certain order, but after the update they all have the same trans_id. (in unload_details_tab). 2 I select select the rows using the value that just got updated (trans_id), this way I know wich rows I needed to select, the...
0
2086
Brad Orders
by: Brad Orders | last post by:
Hi all Here is my situation: When table A is updated, I need to record some data in table B, then apply the update to table A Normally I would use a FOR UPDATE trigger, but the table has a TEXT field in it. Therefore, I must use an INSTEAD OF trigger. Columns may be added to this table without my knowledge or control, and without warning.
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8638
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8365
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2626
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.