Workflow: Init SR Query

From ExxtremeWiki
Jump to: navigation, search

Query to find records in SR that need to be put in workflow[edit]

SELECT * FROM sr WHERE historyflag = 0 AND class = 'SR' AND langcode = 'FR' AND STATUS = 'NEW'
	AND NOT EXISTS (SELECT NULL FROM wfinstance WHERE ownertable = 'SR' AND ownerid = sr.ticketid)