Re: Triggering on 93rd column being updated?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 07/29/04


Date: Thu, 29 Jul 2004 10:50:39 -0400

Why don't you refer to the column name??? What possible significance does
the nth column have? Is the name of the column you're interested in really
going to change, and if so, more often than its ordinal position? This
sounds like very dangerous programming to me...

-- 
http://www.aspfaq.com/
(Reverse address to reply.)
"R Weston" <RWeston@discussions.microsoft.com> wrote in message
news:CF060CEE-660E-4ABB-8FF8-874250BAD54B@microsoft.com...
> I'm attempting to trigger an insert into another table (temporary) on the
updated of one field in an order table.
>
> CREATE TRIGGER name
> ON table
> FOR update AS
>
> ** PROBLEM - i think is below
> ** I had tried just: (COLUMNS_UPDATED() & power(2,(93-1))) > 0 but i
receive ** an Arithmetic overflow error for type int, value = [really big
number here].
> ** what is the proper way to check on a table with this many columns?
> ** TIA
>
>    IF( SUBSTRING(COLUMNS_UPDATED(),1,1)=power(2,(93-1)))
>       BEGIN
>             [my insert]
>    END


Relevant Pages

  • Re: BGN
    ... >>I refer the audience to my comments in another thread. ... It's a shame he's wrong, otherwise it would be sage commentary. ... it has to a stupidly small thing to trigger something like that. ...
    (uk.rec.motorcycles)
  • PPT TimeLine and error in code?
    ... I cannot see how to refer to the already exisiting shape when it comes ... and then oSh in the trigger line, ... Set oShB = oSl.Shapes.AddShape(msoShapeRectangle, ...
    (microsoft.public.office.developer.vba)
  • Re: options and propfind
    ... Do you use webdav? ... Bernard Cheah ... > know what application or occasion would trigger them. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Trigger and SP
    ... Use the inserted & deleted tables which are accessible within the trigger. ... refer to SQL Server Books Online. ...
    (microsoft.public.sqlserver.programming)