Forum Replies Created

Viewing 15 posts - 331 through 345 (of 774 total)

  • RE: trigger

    INSERT INTO CONTRIBUINTES VALUES ('7401010488',Null, '0016050002', 'A', Null, 'TP7', Null, Null, Null, '3ª CONSERVATORIA DO REG.CIVIL DA COMARCA DE LUANDA',...

  • RE: trigger

    INSERT INTO CONTRIBUINTES VALUES ('7401010488',Null, '0016050002', 'A', Null, 'TP7', Null, Null, Null, '3ª CONSERVATORIA DO REG.CIVIL DA COMARCA DE LUANDA',...

  • RE: trigger

    How can I send the data sample?

    Text file?

  • RE: trigger

    and please, forget the trigger: TRG_CONTRIBUINTES_TRILHA_ALTERACOES_INS

    I deleted from my table.

  • RE: trigger

    That updates the entire table!

    I have deleted my first trigger and created a new one based on the code changes you told me.

    The trigger is now like:

    USE [SGCTCentral]

    GO

    /****** Object: ...

  • RE: trigger

    I dont understand the code below:

    update contribuintes

    set

    nif = d.nif,

    ...

  • RE: trigger

    Hi,

    The table ddl is:

    USE [SGCTCentral]

    GO

    /****** Object: Table [dbo].[CONTRIBUINTES] Script Date: 11/07/2012 11:46:02 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[CONTRIBUINTES](

    [NIF] [varchar](20) NULL,

    [FILIAL_NUMBER] [char](1) NULL,

    [NIF_ANTIGO] [varchar](20)...

  • RE: trigger

    Sean Lange (10/30/2012)


    I think this should do what you are looking for but it is untested because I don't have ddl to work with.

    create trigger TRG_CONTRIBUINTES_VERIFCA_RF_E_NIF on contribuintes

    for update

    as begin

    update...

  • RE: trigger

    like this:

    update

    contribuintes

    set

    nif = c.nif

    from

    contribuintes c

    join

    deleted d

    on

    d.nif_antigo = c.nif_antigo

    where

    c.numeroposto = 'Central'

  • RE: trigger

    The code:

    update

    contribuintes

    set

    nif = c.nif

    from

    contribuintes c

    join

    inserted i

    on

    i.nif_antigo = c.nif_antigo

    where

    i.numeroposto = 'Central'

    Has a problem.

    I want that...

  • RE: trigger

    I think that is what is needed but we have a problem:

    I only want that the trigger acts if the column numeroposto new value is 'Central'. If it's not, it...

  • RE: trigger

    Hi,

    What I'm trying to do is:

    I have a table named "contribuintes" this table has several fields, including the fileds:

    numeroposto, cod_rep_fiscal and NIF.

    I want that, if an update takes place and...

  • RE: trigger

    Thank you for the reply.

    Same problem.

    Error bellow:

    Msg 4104, Level 16, State 1, Procedure TRG_CONTRIBUINTES_VERIFCA_RF_E_NIF, Line 11

    The multi-part identifier "deleted.NUMEROPOSTO" could not be bound.

    Msg 4104, Level 16, State 1, Procedure TRG_CONTRIBUINTES_VERIFCA_RF_E_NIF,...

  • RE: Stored procedure error

    I have done it.

    My proc is now as this:

    USE [SGSC]

    GO

    /****** Object: StoredProcedure [dbo].[spSGCT_UPDATESINCRONISMO_SGCTLOCAIS] Script Date: 06/27/2012 16:13:12 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    ALTER PROCEDURE [dbo].[spSGCT_UPDATESINCRONISMO_SGCTLOCAIS]

    (@DATA1 AS...

  • RE: Stored procedure error

    The procedure is now like this:

    USE [SGSC]

    GO

    /****** Object: StoredProcedure [dbo].[spSGCT_UPDATESINCRONISMO_SGCTLOCAIS] Script Date: 06/27/2012 14:33:55 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    ALTER PROCEDURE [dbo].[spSGCT_UPDATESINCRONISMO_SGCTLOCAIS]

    (@DATA1 AS varchar(50),@DATA2 AS varchar(50),@NOMEFICHEIRO...

Viewing 15 posts - 331 through 345 (of 774 total)