------------------------View the Event Driven Task Queue---------------------

select	tqm.TaskQueueMessageID
,	e.Entity
,	v.VendorName
,	tqm.ExecutionTime
,	tn.TaskName
,	tqm.VendorID
,	tqm.EventName
,	tqm.CompleteTime
,	tqm.EntityEventTime
,	tqm.status
,	tqm.longkey
,	tqm.TaskNameID
,	tqm.EventName
--,	*
from tbTaskQueueMessage tqm with (nolock)
join tbEntity e with (nolock) on tqm.Entityid = e.Entityid
join tbTaskName tn with (nolock) on tqm.TaskNameID = tn.TaskNameId
join tbVendor v with (nolock) on tqm.vendorid = v.vendorid
order by tqm.TaskQueueMessageID desc

---------------Move the Execution time in the Event Driven Task Queue---------

--Update tbTaskQueueMessage
--set ExecutionTime = '2019-10-10 15:15:00.000'
--Where TaskQueueMessageID in (
--1286549
--)

-----------------------------------------------

select top 100 * from tbExportQueueMessage
where entityid =123
order by 1 desc

