Hi i am trying to learn mathematica.
I am following instruction in one of the questions asked before and did the following:
In SQL Server a stored procedure is created as follows:
CREATE PROCEDURE dbo.math_execute_external_script
@scriptName [varchar](1000)
WITH EXECUTE AS CALLER
AS
BEGIN
Declare @command varchar(1000)
set @command='"C:\Users\atfai\OneDrive\Documents\Visual Studio 2015\Projects\rproject1\rproject1\' + @scriptName + '"'
Exec Master..xp_Cmdshell @command
END
I am executing the file as follows
EXECUTE dbo.math_execute_external_script 'mathematicaScript.bat'
The batch file contain the following
@echo off
setlocal
PATH = C:\Program Files\Wolfram Research\Mathematica\10.4;%PATH%
start MathKernel -script "C:\Users\atfai\WolframWorkspaces\Base\MathematicaProject1\MathematicaProject1.m"
endlocal
MathematicaProject1.m
contains 1+1
now when i execute i get NULL
in sql server
Can someone explain how to get the answer 2
in sql server?