View Single Post

   
  #4 (permalink)  
Old 02-27-2008, 08:11 PM
Joe Bertolini
 
Posts: n/a
Default Re: SQL2K Trigger problem

Thanks for your reply. Unfortunately neither suggestion worked and
dbo.setting_allowance_condition_rule definitely does exist. Guess I'll just
have to kludge in code in the front end app, Yuk!

Thanks anyway.

"Kresimir Radosevic" <kresimir.radosevic@zg.tel.hr> wrote in message
news:u0DdoLHQDHA.2316@TK2MSFTNGP11.phx.gbl...
> You can update other tables from triger, use
>
> UPDATE [dbo].[setting_allowance_condition_rule]
> SET rule_description = deleted.rule_description
> FROM [dbo].[setting_allowance_condition_rule] inner join deleted on
> [dbo].[setting_allowance_condition_rule].allowance_rule_key =
> deleted.allowance_rule_key
>
> and if that fails check if setting_allowance_condition_rule really exists.
>
> KR
>
> "Joe Bertolini" <Joe.Bertolini@bgc-contracting.com.au> wrote in message
> news:Odh13vGQDHA.2160@TK2MSFTNGP11.phx.gbl...
> > I've got a problem with a trigger I've set on a table. This is the code

> for
> > the trigger:
> >
> > CREATE TRIGGER Update_Allowance_Rule ON [dbo].[setting_allowance_rule]
> > FOR UPDATE
> > AS
> > UPDATE [dbo].[setting_allowance_condition_rule]
> > SET [dbo].[setting_allowance_condition_rule].rule_description =
> > deleted.rule_description
> > WHERE [dbo].[setting_allowance_condition_rule].allowance_rule_key =
> > deleted.allowance_rule_key
> >
> > The problem that I'm having is that when an update occurs on the
> > setting_allowance_rule the trigger fires but I get the following ODBC

> error:
> >
> > [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
> > 'dbo.setting_allowance_condition_rule'
> >
> > setting_allowance_condition_rule does exist, the spelling is correct and

> it
> > is owned by dbo. The version of the SQL Server ODBC driver is
> > 2000.81.9030.04. For the life of me, I can't see what I've done wrong.

> Have
> > I done something stupid? Any help anyone can offer will be greatly
> > appreciated.
> >
> > Thanks
> >
> >
> > Joe Bertolini
> >
> >

>
>



Reply With Quote