I am trying to build a summary view based on a lot of status info.
In the original table, I have multiple rows with varying iQueueID values, and cStatusDesc can be any number of things. I just want the rows where there is only 1 entry and it is 'File added to the queue. Ready for processing'. In the original table, only 1 row satisfies this condition, but I seem to be getting that 1 row and also rows that have 'File added to the queue. Ready for processing' and other values as well.
Select Count(*) as iCount , iQueueID , 'Submitted' as cSummaryStatus
from AppQueueStd
Where cStatusDesc='File added to the queue. Ready for processing.'
Group By iQueueID , cTPAID , cSubmittedBy , tCreateDt
Having Count(*)=1
?