How do I CAST a date in a subquery? Currently getting an error: Conversion failed when converting date and/or time from character string
Use a CTE to get the wanted rows and then do the conversion
If the strings are not a correct format like seen below, you will get an error.


CREATE TABLE TPR(CaseNumber int,Source varchar(100))
GO




INSERT INTO TPR VALUES (1,'Q3 Completed'),(2,'2021/01/01')
GO




WITH CTE AS (
     SELECT Source
     FROM TPR
     WHERE Source NOT LIKE 'Q3 Completed' )
     SELECT CaseNumber
FROM TPR
WHERE Source IN (SELECT Source FROM CTE)
GO


| CaseNumber |
| ---------: |
|          2 |


db&lt;&gt;fiddle here