USE DMTradeinstanceDMTrade
GO

Declare @notificationClassName varchar(255)
Declare @notificationBatchId bigint

Select @notificationClassName = 'DMTradeNotifications'
select @notificationBatchId = max(NotificationBatchId) from NSDMTradeNotificationsNotificationBatches1


EXEC NSNotificationBatchDetails @notificationClassName, @notificationBatchId
go