Nick, I think your query fails because there is a potential for multiple 
values on the right-hand side of WHERE RaceID=.

Try this:
WHERE RaceId = (SELECT DISTINCT ID  FROM Races WHERE Name = 'totley moor' 
AND Date LIKE "2009%");


For that matter, wouldn't your query be better composed as:

SELECT * from races, times WHERE RACEID = ID and Races.Name = 'totley moor' 
AND Date LIKE "2009%";

Tom

----- Original Message ----- 
From: <[email protected]>
To: <[email protected]>
Sent: Saturday, January 23, 2010 7:59 PM
Subject: [sqlite] update on Ticket 3437


> Hi,
>   I submitted this some time ago, see
>   http://www.sqlite.org/cvstrac/tktview?tn=3437,39.
>
> I've just been messing about with this again and have found out what was
> happening. The following script demonstrates the problem and resolution:
> [begin bug2.sql]

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to