Viewing 15 posts - 376 through 390 (of 774 total)
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]
June 6, 2012 at 3:43 am
This is the entire code:
ALTER PROCEDURE [dbo].[spSGCT_VALIDA_SGCTLocais] (@DB as varchar(50))
AS
BEGIN
set nocount on
...
June 5, 2012 at 2:57 am
I made like this:
SET @SQLString = 'select @maxVal = isnull(max(cod_sincronismo_fim),0)
...
June 4, 2012 at 9:52 am
Daxesh Patel (6/4/2012)
you cannot set a variable using exec('') since the command will be executed in different session, you have to...
June 4, 2012 at 9:13 am
If I add the execute command to the query, when I execute the procedure I receive the following:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '='.
Command:
exec('set '+@MaxTotalidade+...
June 4, 2012 at 9:04 am
if I do like this:
set @cmd = ('set '+@MaxTotalidade+ ' = (select isnull(max(cod_sincronismo_fim),0) as maximo
...
June 4, 2012 at 9:02 am
Yes.
Thanks.
But still I have a problem.
exec('set '+@MaxTotalidade+ ' =(select convert(bigint,isnull(max(cod_sincronismo_fim),0))
...
June 4, 2012 at 8:47 am
To work I had to put like this:
select @cmd = 'C:\"Program Files"\WinRAR\WinRAR.exe x -u '+@NomeFinal+' '+@DirectoriaFinal+''
May 24, 2012 at 6:52 am
This is what i get:
'C:\Program' is not recognized as an internal or external command,
May 24, 2012 at 6:40 am
'C:\Program' is not recognized as an internal or external command,
May 24, 2012 at 6:40 am
It say "Command(s) completed successfully."
May 24, 2012 at 6:24 am
No erros message is displayed
May 24, 2012 at 6:23 am
Very strange.....
My command is now as :
"C:\Program Files\WinRAR\WinRAR.exe" x -u "c:\import\PastaExportacao SGCTlocal - 4.01 - 20120523 112426 - T - 1118.rar" "c:\import\PastaExportacao SGCTlocal - 4.01 - 20120523 112426...
May 24, 2012 at 6:22 am
Viewing 15 posts - 376 through 390 (of 774 total)