Viewing 15 posts - 331 through 345 (of 771 total)
and please, forget the trigger: TRG_CONTRIBUINTES_TRILHA_ALTERACOES_INS
I deleted from my table.
November 7, 2012 at 9:14 am
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: ...
November 7, 2012 at 9:11 am
I dont understand the code below:
update contribuintes
set
nif = d.nif,
...
November 7, 2012 at 5:02 am
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)...
November 7, 2012 at 4:57 am
Sean Lange (10/30/2012)
create trigger TRG_CONTRIBUINTES_VERIFCA_RF_E_NIF on contribuintes
for update
as begin
update...
November 6, 2012 at 3:51 am
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'
October 30, 2012 at 8:52 am
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...
October 30, 2012 at 8:50 am
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...
October 30, 2012 at 8:32 am
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...
October 30, 2012 at 8:03 am
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,...
October 30, 2012 at 7:40 am
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...
June 27, 2012 at 9:19 am
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...
June 27, 2012 at 8:16 am
It returns this error:
Msg 8114, Level 16, State 5, Procedure spSGCT_UPDATESINCRONISMO_SGCTLOCAIS, Line 32
Error converting data type varchar to bigint.
June 27, 2012 at 8:15 am
Hi saw IT.
Definition:
CREATE TABLE [dbo].[SINCRONISMO](
[CODIGO] [bigint] IDENTITY(1,1) NOT NULL,
[DT_INI_PROC] [datetime] NOT NULL,
[DT_FIM_PROC] [datetime] NULL,
[TP_PROCESSO] [char](1) NOT NULL,
[COD_TP_CLASSIFICACAO] [int] NOT NULL,
[UTILIZADOR] [int] NOT NULL,
[COD_SINCRONISMO] [bigint] NULL,
[FICHEIRO] [varchar](255) NOT NULL,
[COD_REP_FISCAL] [varchar](5) NULL,
[COD_SINCRONISMO_INI]...
June 27, 2012 at 8:04 am
Viewing 15 posts - 331 through 345 (of 771 total)