You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.4 KiB
33 lines
1.4 KiB
USE [FastMoneyPro_Remit]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[proc_pushPayToInficare] Script Date: 9/27/2019 1:30:14 PM ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE proc [dbo].[proc_pushPayToInficare]
|
|
|
|
AS
|
|
|
|
DECLARE @SQL VARCHAR(MAX)
|
|
|
|
SET @SQL = ''
|
|
|
|
IF EXISTS(SELECT TOP 1 'X' FROM domesticPayQueueList WITH(NOLOCK))
|
|
BEGIN
|
|
SELECT TOP 100
|
|
@SQL = COALESCE(@SQL + ' EXEC sp_pushPay ', '') + '''' + ISNULL(controlNo, '') + '''' FROM domesticPayQueueList WITH(NOLOCK)
|
|
|
|
PRINT @SQL
|
|
EXEC (@SQL)
|
|
|
|
DELETE FROM domesticPayQueueList
|
|
FROM domesticPayQueueList ql
|
|
INNER JOIN hremit.dbo.moneySend ms ON ql.controlNoInficareEnc = ms.refno
|
|
WHERE ms.[status] = 'Paid'
|
|
END
|
|
|
|
|
|
|
|
|
|
GO
|