Callable Procedures > SQL Server Examples:
  
SQL Server Examples:
1. SQL Server example of a call from a Stored Procedure:
Add the following to the declaration section of the stored procedure:
DECLARE @v_job_name varchar(256)
Then add the call to the procedure:
SELECT @v_job_name = dbo.WsParameterReadJ('NAME', @p_job_id)
2. SQL Server example of a call from the command line using sqlcmd (all one line):
sqlcmd -S"SQL SERVER" -WslWarehouse -E -Q"SELECT CAST(dbo.WsParameterReadJ('NAME',1) AS CHAR(64))"
The following out is typical:
----------------------------------------------------------------
Daily Run
(1 rows affected)
3. SQL Server example of a call from QAD SQL Admin
SELECT dbo.WsParameterReadJ('NAME',1);