Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2003, 06:58 AM
Registered User
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default UPDATE trigger won't fire on CASE-only condition

Hi,this is really important to me.When I'm trying to make standart UPDATE via UPDATE TRIGGER like this:

update [table] set [column]=[value] where [index_column]=[index]

it's working,but I've made auto-updating batch which cumulates many updates on one table together,but it won't fire the trigger,it goes like this:

update [table]
 set [column]=case
   when [index_column] in([index]) then [value]
  else [column]
 end

an update essentially works (ofcourse) but trigger is not fire for single-row update neither for multi-row update for example:

update [table]
 set [column]=case
   when [index_column] in([index1]) then [value1]
   when [index_column] in([index2]) then [value2]
  else [column]
 end

I hope you understand,I'll be glad to see your solutions to this,coz whole project is driven thru this core batch-generator and it disables any update-trigger possibilities.

thx

 
Old November 14th, 2003, 11:59 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

some questions
i am asking why you are using trigger to update, and what types of triggers you are using

Ahmed Ali
Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
update with case darkhalf Access 3 February 20th, 2008 12:00 AM
After Update Trigger debbiecoates SQL Server 2000 2 February 15th, 2008 04:55 AM
Import using SSIS trigger not fire on that table chandrapal SQL Server 2000 0 October 6th, 2007 11:21 AM
Update statement with EXISTS condition using 2 TBL [email protected] SQL Server 2000 3 September 30th, 2004 07:16 AM
Can we stop to fire trigger in SQL Server? vincentc SQL Server 2000 2 November 18th, 2003 12:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.