You're right! I arrived at a failure of a different kind because I did not drop the Races table as per his script between adding the first record with ID='20' and the second with ID=20. If Races table contains two records, the first with ID='20' and the second with ID=20, his query fails, even though the second record satisfies the condition. Adding DISTINCT somehow resolves this failure; a JOIN ON RaceID=ID assuredly does. If the order is reversed, then his query works. So the WHERE clause looks at the first result from the SELECT; DISTINCT probably re-ordered the results with the Integer value first, the Text value second. I got caught up in this behaviour without noting that his query would have worked had I not skipped dropping the table. (I'm a novice)
Tom "Igor Tandetnik" <[email protected]> wrote in message news:[email protected]... > Tom Holden wrote: >> Nick, I think your query fails because there is a potential for multiple >> values on the right-hand side of WHERE RaceID=. > > No, it fails because 20 != '20' _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

