SQLite Forum

A suboptimal solution - not using the index.
Login
I believe you would need the following to get *correct* results, assuming that the description of the constraints is accurate.

```
   select * 
     from t2 
left join t1 
       on a == cast(b as text) 
      and typeof(b)=='text';
```