List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 26 2002 1:28am
Subject:Re: MySQL Book by Dubois - Pg. 63 Tutorial Question
View as plain text  
At 19:40 -0400 6/25/02, John Coder wrote:
>DavidCraig@stripped wrote:
>
>>
>>mysql>SELECT date, type, event_id
>>FROM event;
>>
>>date              type              event_id
>>1999-09-03           Q                      1
>>1999-09-03           Q                      2
>>...                  ....                        .....
>>
>Your date shows 199-09-03
>
>>
>>mysql>      SELECT student_id, date, score, type
>>->FROM event, score
>>->WHERE date = "1999-09-23"
>>->event.event_id = score.event_id;
>>Empty set  <0.00 sec>
>>mysql>
>>
>You qre asking for dates = 1999-09-23
>Hence nothing matches

Good try, but ... Bzzzt!  :-)

He only showed part of the table; there actually are records that
match 1999-09-23.

The real cause is more likely that there is a missing AND in the WHERE
clause, which should read:

WHERE date = "1999-09-23"
AND event.event_id = score.event_id

>
>>
>>Why doesn't the query show any records?  What am I doing wrong.   Why is
>>all I get an empty set?  Any help would be appreciated.
>>
>>TIA
>>
>>Dave Craig
>>
>>D. H. Craig, CSM
Thread
MySQL Book by Dubois - Pg. 63 Tutorial QuestionDavidCraig25 Jun
  • Re: MySQL Book by Dubois - Pg. 63 Tutorial QuestionJohn Coder26 Jun
    • Re: MySQL Book by Dubois - Pg. 63 Tutorial QuestionPaul DuBois26 Jun
  • Re: MySQL Book by Dubois - Pg. 63 Tutorial QuestionGalen Wright-Watson26 Jun
Re: MySQL Book by Dubois - Pg. 63 Tutorial QuestionDavidCraig27 Jun