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_current_date varchar(4000)
Then add the call to the procedure:
SELECT @v_current_date = dbo.WsParameterReadF('CURRENT_DATE')
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.WsParameterReadF('CURRENT_DATE') AS CHAR(79))"
The following out is typical:
-------------------------------------------------------------------------------
2009-01-10
(1 rows affected)
3. SQL Server example of a call from QAD SQL Admin
{Call WsParameterRead('CURRENT_DATE',?,?)};