Viewing 15 posts - 376 through 390 (of 771 total)
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
I don't have XP, SQL Server is doing this on W2k3.
Yes, I have the folder:
c:\import\PastaExportacao SGCTlocal - 4.01 - 20120523 112426 - T - 1118.rar_Dir
May 24, 2012 at 6:00 am
It's as you told:
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 - T...
May 24, 2012 at 5:07 am
Viewing 15 posts - 376 through 390 (of 771 total)