I don't understand why this t-sql query doesn't work. 

What is it about MSSQL (or just SQL) in general, that won't allow me to update one table with a date I just derived from a subquery?

```
UPDATE table1
SET someOldDate = innertable.derivedDate
WHERE
uniqueId in 

(SELECT CAST(str(table2.VisitMo)+"/"+str(table2.Visitday)+"/"+ str(table2.Visityr) as datetime) as derivedDate
    ,uniqueId
 FROM table1 t1 INNER JOIN table2 t2 
 ON t1.uniqueId = t2.uniqueId
 WHERE CAST(str(t2.VisitMo)+"/"+str(t2.visitday)+"/"+ str(t2.visityr))  != t2.someOldDate) as innertable

```

I don't mind that the query doesn't work, but it drives me nuts that I don't get why it doesn't work. 
Any philosophical advice gladly taken.