Home All Groups Group Topic Archive Search About
Author
12 Jan 2006 8:28 PM
Abraham Andres Luna
hello everyone,

the documentation doesnt specify so i'm just gonna guess, but how would i
specify multiple columns using the if update syntax

IF UPDATE (Column)

is documented

i'm gonna try

IF UPDATE (Column1, Column2)

hope it works

ty

Author
12 Jan 2006 8:38 PM
Aaron Bertrand [SQL Server MVP]
IF UPDATE(Column1) AND UPDATE(Column2)


Show quote
"Abraham Andres Luna" <a**@rdk.com> wrote in message
news:%23K$U%23a7FGHA.216@TK2MSFTNGP15.phx.gbl...
> hello everyone,
>
> the documentation doesnt specify so i'm just gonna guess, but how would i
> specify multiple columns using the if update syntax
>
> IF UPDATE (Column)
>
> is documented
>
> i'm gonna try
>
> IF UPDATE (Column1, Column2)
>
> hope it works
>
> ty
>
Author
12 Jan 2006 8:58 PM
Abraham Andres Luna
ty for your answer
Author
12 Jan 2006 8:42 PM
Daniel P.
Probably the only way is to use
IF COLUMNS_UPDATED

Show quote
"Abraham Andres Luna" wrote:

> hello everyone,
>
> the documentation doesnt specify so i'm just gonna guess, but how would i
> specify multiple columns using the if update syntax
>
> IF UPDATE (Column)
>
> is documented
>
> i'm gonna try
>
> IF UPDATE (Column1, Column2)
>
> hope it works
>
> ty
>
>
>
Author
12 Jan 2006 8:51 PM
SQL
I would check inserted with deleted tables
If you do this update table set value = 500 where value = 500
then the IF UPDATE part will fire anyway even though the value hasn't
changed

http://sqlservercode.blogspot.com/
Author
12 Jan 2006 8:54 PM
Trey Walpole
I wouldn't recommend this - multiple UPDATE()s in are much cleaner and
easier to read.
Plus, if the column order ever changes, you'll have to remember to redo
the trigger.

Daniel P. wrote:
Show quote
> Probably the only way is to use
> IF COLUMNS_UPDATED
>
> "Abraham Andres Luna" wrote:
>
>
>>hello everyone,
>>
>>the documentation doesnt specify so i'm just gonna guess, but how would i
>>specify multiple columns using the if update syntax
>>
>>IF UPDATE (Column)
>>
>>is documented
>>
>>i'm gonna try
>>
>>IF UPDATE (Column1, Column2)
>>
>>hope it works
>>
>>ty
>>
>>
>>

AddThis Social Bookmark Button