Forum Replies Created

Viewing 15 posts - 361 through 375 (of 771 total)

  • RE: Stored Procedure error

    How can I do it?

    Can you suggest how to do it?

    Thanks in advance

  • RE: Try Catch

    What about if I don't put a

    begin tran

    commit tran

    inside each separated procedure and put the begin and commit tran only in the master procedure (the one that executes the...

  • RE: Stored Procedure error

    This is what it suppose to prevent from being null:

    SET @STRSQL = 'select @val = isnull(CODIGO,0) FROM '+@DB+'.DBO.UTILIZADORES WHERE NOME = ''sgsc'''

    SET @PARMDEFINITION = '@Val INT OUTPUT'

    EXECUTE sp_executesql...

  • RE: Stored Procedure error

    Ok. When I change the type to Nvarchar it worked fine.

    Now I have other problem with the same procedure.

    Code:

    ALTER PROCEDURE sp_SGCT_USERSGSC (@DB as varchar(50))

    AS

    BEGIN

    DECLARE @STRSQL AS NVARCHAR(4000),

    @PARMDEFINITION AS NVARCHAR (4000),

    @VALOR...

  • RE: Try Catch

    There is no other way of doing this?

    Needs to be with the transaction count?

  • RE: Try Catch

    hum.....

    But I have a begin transaction

    ands commit transaction on the central procedure (which calls the other procedures).

    How can I solve this?

  • RE: error in query

    It was the '' in the codrf.

    The correct is:

    SET @SQLString = 'select @maxVal = isnull(max(cod_sincronismo_fim),0)

    ...

  • RE: error in query

    Data for table ImportarFicheiros:

    T11184.01PastaExportacao SGCTlocal - 4.01 - 20120523 112426 - T - 1118_CS.rarD:\DBs\exp\teste\PastaExportacao SGCTlocal - 4.01 - 20120523 112426 - T - 1118_CS.rar_Dir\0NULL

    111911194.01PastaExportacao SGCTlocal - 4.01 -...

  • RE: error in query

    Data for table sincronismo:

    184582012-03-06 17:35:06.0002012-03-06 18:07:51.000I138NULLPastaExportacao SGCTlocal - 4.20 - 20120306 162529 - D - 56.rar4.2056560

    184592012-03-06 17:35:06.0002012-03-06 18:20:28.000I13857PastaExportacao SGCTlocal - 4.20 - 20120228 163220 - D - 51.rar4.2061611

    184602012-03-06...

  • RE: QUERY ERROR

    THANKS

  • RE: error in query

    and I have done the opposite (put the variable as bigint) but still an error:

    ALTER PROCEDURE [dbo].[spSGCT_VALIDA_SGCTLocais] (@DB as varchar(50))

    AS

    BEGIN

    set nocount on...

  • RE: error in query

    thank you for the feedback.

    I have tried to convert the bigint field to varchar, but still same error happen.

    Here is the code:

    ALTER PROCEDURE [dbo].[spSGCT_VALIDA_SGCTLocais] (@DB as varchar(50))

    AS

    BEGIN

    ...

  • RE: error in query

    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] [bigint] NULL,

    [COD_SINCRONISMO_FIM]...

  • RE: error in query

    Hi

    Here is the DDL

    :CREATE TABLE [dbo].[FicheirosImportar](

    [SessaoInicio] [varchar](5) NULL,

    [SessaoFim] [varchar](5) NULL,

    [Codrf] [varchar](5) NULL,

    [Nome] [varchar](500) NULL,

    [Caminho] [varchar](500) NULL,

    [Valido] [bit] NULL,

    [Ordem] [int] NULL

    ) ON [PRIMARY]

  • RE: error in query

    This is the entire code:

    ALTER PROCEDURE [dbo].[spSGCT_VALIDA_SGCTLocais] (@DB as varchar(50))

    AS

    BEGIN

    set nocount on

    ...

Viewing 15 posts - 361 through 375 (of 771 total)