Jump to content


Photo

Error message


  • Please log in to reply
1 reply to this topic

#1 Master

Master
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 March 2003 - 07:25 AM

SELECT day, month, year,
winning_country.country_name winning_country,
losing_country.country_name losing_country,
matches.winning_score, matches.losing_score, location, crowd, worldcup, (matches.winning_score + matches.losing_score) as totalpoints
FROM matches,
countries winning_country,
countries losing_country
WHERE (matches.winning_country = winning_country.country_id)
AND (matches.losing_country = losing_country.country_id)
AND (totalpoints>50)

When I run this query, I get an error saying column totalpoints does not exist. Why is that?

#2 pallevillesen

pallevillesen
  • Members
  • PipPipPip
  • Advanced Member
  • 135 posts
  • LocationDenmark

Posted 18 March 2003 - 12:23 PM

Good question,

try:


SELECT day, month, year,

winning_country.country_name winning_country,

losing_country.country_name losing_country,

matches.winning_score, matches.losing_score, location, crowd, worldcup, ((matches.winning_score + matches.losing_score) as totalpoints)

FROM matches,

countries winning_country,

countries losing_country

WHERE (matches.winning_country = winning_country.country_id)

AND (matches.losing_country = losing_country.country_id)

AND (totalpoints>50) 


If that doesn\'t work, then try putting


(matches.winning_score + matches.losing_score) > 50


in the WHERE clause instead...

P.
Palle Villesen, www.birc.dk [br]Bioinformatics Research Center




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users