vb89
10-10-2008, 03:07 PM
I'm trying to create a select statement that takes the max of the ot.possession column and divides it by 2 and puts that value in the football_schedule table as the column quarter...Right now when i run the query there is no output, any ideas?
SELECT *
FROM customer_data.cd_football_game_scoring t, customer_data.cd_football_schedule s
WHERE s.quarter =(select(max(count(t.ot_possession) /2)) from customer_data.cd_football_game_scoring t group by t.game_code)
AND t.game_code = 814533
AND s.game_code = 814533
AND t.scored = 'Y'
SELECT *
FROM customer_data.cd_football_game_scoring t, customer_data.cd_football_schedule s
WHERE s.quarter =(select(max(count(t.ot_possession) /2)) from customer_data.cd_football_game_scoring t group by t.game_code)
AND t.game_code = 814533
AND s.game_code = 814533
AND t.scored = 'Y'