Set Private Data to SQL result
Posted: Tue Feb 05, 2019 11:26 pm
Using Switch 2018.
I'd like to do a SQL query and store the result in Private Data.
This is my SQL statement
EXEC SW_GetDeadlineDate_r1
'[Job.PrivateData:Key="p1"]' ,
'[Job.PrivateData:Key="deadline"]'
____________________________________________________________________
Here is my SQL Stored Procedure
CREATE PROCEDURE [dbo].[SW_GetDeadlineDate_r1]
@PubID char(6), @Deadline int output
AS
BEGIN
Set @Deadline = (SELECT [Deadline]
FROM [dbo].[Publications] where [Publication_ID] = @PubID)
END
GO
____________________________________________________________________
The SQL works in SSMS, but the Private Data does not get updated in Switch.
Thanks
I'd like to do a SQL query and store the result in Private Data.
This is my SQL statement
EXEC SW_GetDeadlineDate_r1
'[Job.PrivateData:Key="p1"]' ,
'[Job.PrivateData:Key="deadline"]'
____________________________________________________________________
Here is my SQL Stored Procedure
CREATE PROCEDURE [dbo].[SW_GetDeadlineDate_r1]
@PubID char(6), @Deadline int output
AS
BEGIN
Set @Deadline = (SELECT [Deadline]
FROM [dbo].[Publications] where [Publication_ID] = @PubID)
END
GO
____________________________________________________________________
The SQL works in SSMS, but the Private Data does not get updated in Switch.
Thanks