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

1 year ago
  1. USE [FastMoneyPro_Remit]
  2. GO
  3. /****** Object: StoredProcedure [dbo].[proc_pushPayToInficare] Script Date: 9/27/2019 1:30:14 PM ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. CREATE proc [dbo].[proc_pushPayToInficare]
  9. AS
  10. DECLARE @SQL VARCHAR(MAX)
  11. SET @SQL = ''
  12. IF EXISTS(SELECT TOP 1 'X' FROM domesticPayQueueList WITH(NOLOCK))
  13. BEGIN
  14. SELECT TOP 100
  15. @SQL = COALESCE(@SQL + ' EXEC sp_pushPay ', '') + '''' + ISNULL(controlNo, '') + '''' FROM domesticPayQueueList WITH(NOLOCK)
  16. PRINT @SQL
  17. EXEC (@SQL)
  18. DELETE FROM domesticPayQueueList
  19. FROM domesticPayQueueList ql
  20. INNER JOIN hremit.dbo.moneySend ms ON ql.controlNoInficareEnc = ms.refno
  21. WHERE ms.[status] = 'Paid'
  22. END
  23. GO