I have a query that I just can't seem to get working.

 

insert into games2 (sea_id,date,time,loc_id,hteam,vteam,div_id) (select
'36',game_date,begin_time,loc_id,home_team_id,away_team_id,(select div_id
from team_season where team_id=s1.div_id) from scheduler s1);

 

Of course, I am getting the dreaded "Unknown column 's1.div_id' in 'where
clause'" error message.

I think the statement above shows what I am trying to do better than me
explaining it.  My only real problem is that the div_id needs to be gotten
from the team_season table.

 

Any help would be appreciated

Thanks

Steve

Reply via email to