SQLite Forum

Thoughts on why this is not working?
Login
Is the "empty" methodology NULL or a blank string?  If NULL, then the comparison <> should be IS NOT ...

Secondly, should not the order by and ProjID constraint not be in the subselect?

```
  SELECT ProjID,
         Updated_By,
         InsertDate,
         var,
         oldv,
         newv
    FROM (
           SELECT ProjID,
                  Updated_By,
                  InsertDate,
                  'Methodology' as var,
                  (
                      SELECT Methodology
                       FROM Project_List
                      WHERE ProjID = o.ProjID
                        AND InsertDate < o.InsertDate
                   ORDER BY InsertDate DESC
                      LIMIT 1
                  ) AS oldv,
                  Methodology as newv
             FROM Project_List as o
            WHERE ProjID = 'PR0000014752'
         ORDER BY InsertDate ASC
         )
   WHERE oldv IS NOT newv;
```